mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Try to fix capsys issue with Python 3.8
This commit is contained in:
1 parent
d33584a2e4
commit
241caa1ec7
3 files changed
+8
-7
No files matched your search
@@ -100,6 +100,7 @@ async def test_auto_start(controller, dummy_gns3vm, dummy_engine):
|
||||
assert controller.computes["vm"].user == "hello"
|
||||
assert controller.computes["vm"].password == "world"
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not working well on Windows")
|
||||
async def test_auto_start_with_error(controller, dummy_gns3vm, dummy_engine):
|
||||
|
||||
|
||||
+6
-6
@@ -50,23 +50,23 @@ def test_parse_arguments(capsys, tmpdir):
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
run.parse_arguments(["-v"])
|
||||
out, err = capsys.readouterr()
|
||||
assert __version__ in "{}{}".format(out.strip(), err.strip()) # Depending of the Python version the location of the version change
|
||||
out, _ = capsys.readouterr()
|
||||
assert __version__ in "{}".format(out.strip()) # Depending of the Python version the location of the version change
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
run.parse_arguments(["--version"])
|
||||
out, err = capsys.readouterr()
|
||||
assert __version__ in "{}{}".format(out.strip(), err.strip()) # Depending of the Python version the location of the version change
|
||||
out, _ = capsys.readouterr()
|
||||
assert __version__ in "{}".format(out.strip()) # Depending of the Python version the location of the version change
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
run.parse_arguments(["-h"])
|
||||
out, err = capsys.readouterr()
|
||||
out, _ = capsys.readouterr()
|
||||
assert __version__ in out
|
||||
assert "optional arguments" in out
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
run.parse_arguments(["--help"])
|
||||
out, err = capsys.readouterr()
|
||||
out, _ = capsys.readouterr()
|
||||
assert __version__ in out
|
||||
assert "optional arguments" in out
|
||||
|
||||
|
||||
Reference in new issue
Block a user