mirror of
https://github.com/meshtastic/python.git
synced 2026-05-19 14:01:09 -04:00
system independent path separators; pytest for windows fixes
This commit is contained in:
@@ -2683,7 +2683,6 @@ def test_tunnel_no_args(capsys):
|
||||
assert re.search(r"usage: ", err, re.MULTILINE)
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform == "win32", reason="Linux is forced in test and no termios")
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.usefixtures("reset_mt_config")
|
||||
@patch("meshtastic.util.findPorts", return_value=[])
|
||||
@@ -2707,7 +2706,6 @@ def test_tunnel_tunnel_arg_with_no_devices(mock_platform_system, caplog, capsys)
|
||||
assert err == ""
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform == "win32", reason="Linux is forced in test and no termios")
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.usefixtures("reset_mt_config")
|
||||
@patch("meshtastic.util.findPorts", return_value=[])
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Meshtastic unit tests for serial_interface.py"""
|
||||
import platform
|
||||
# pylint: disable=R0917
|
||||
|
||||
import re
|
||||
@@ -28,9 +29,13 @@ def test_SerialInterface_single_port(
|
||||
iface.close()
|
||||
mocked_findPorts.assert_called()
|
||||
mocked_serial.assert_called()
|
||||
mocked_open.assert_called()
|
||||
mock_get.assert_called()
|
||||
mock_set.assert_called()
|
||||
|
||||
# doesn't get called in SerialInterface.__init__ on windows
|
||||
if platform.system() != "Windows":
|
||||
mocked_open.assert_called()
|
||||
mock_get.assert_called()
|
||||
mock_set.assert_called()
|
||||
|
||||
mock_sleep.assert_called()
|
||||
out, err = capsys.readouterr()
|
||||
assert re.search(r"Nodes in mesh", out, re.MULTILINE)
|
||||
|
||||
Reference in New Issue
Block a user