diff --git a/tests/modules/vpcs/test_vpcs_vm.py b/tests/modules/vpcs/test_vpcs_vm.py index 3a0e811f..c16e10f0 100644 --- a/tests/modules/vpcs/test_vpcs_vm.py +++ b/tests/modules/vpcs/test_vpcs_vm.py @@ -202,8 +202,8 @@ def test_get_startup_script_using_default_script(vm): vm._script_file = None filepath = os.path.join(vm.working_dir, 'startup.vpc') - with open(filepath, 'w+') as f: - assert f.write(content) + with open(filepath, 'wb+') as f: + assert f.write(content.encode("utf-8")) assert vm.startup_script == content assert vm.script_file == filepath diff --git a/tests/utils/test_asyncio.py b/tests/utils/test_asyncio.py index 96fbde7b..b4fc7ae6 100644 --- a/tests/utils/test_asyncio.py +++ b/tests/utils/test_asyncio.py @@ -18,6 +18,7 @@ import asyncio import pytest +import sys from unittest.mock import MagicMock from gns3server.utils.asyncio import wait_run_in_executor, subprocess_check_output, wait_for_process_termination @@ -43,6 +44,7 @@ def test_exception_wait_run_in_executor(loop): result = loop.run_until_complete(asyncio.async(exec)) +@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows") def test_subprocess_check_output(loop, tmpdir, restore_original_path): path = str(tmpdir / "test")