mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fix test on Windows
Sadly python crash on my Windows and I can't run the full test suite. Fix #377
This commit is contained in:
1 parent
ad4501838b
commit
480ca037cd
3 files changed
+16
-9
No files matched your search
@@ -17,6 +17,7 @@
|
||||
|
||||
import pytest
|
||||
import os
|
||||
import sys
|
||||
import stat
|
||||
from tests.utils import asyncio_patch
|
||||
from unittest.mock import patch
|
||||
@@ -26,7 +27,10 @@ from gns3server.config import Config
|
||||
@pytest.fixture
|
||||
def fake_qemu_bin():
|
||||
|
||||
bin_path = os.path.join(os.environ["PATH"], "qemu-system-x86_64")
|
||||
if sys.platform.startswith("win"):
|
||||
bin_path = os.path.join(os.environ["PATH"], "qemu-system-x86_64w.exe")
|
||||
else:
|
||||
bin_path = os.path.join(os.environ["PATH"], "qemu-system-x86_64")
|
||||
with open(bin_path, "w+") as f:
|
||||
f.write("1")
|
||||
os.chmod(bin_path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
|
||||
|
||||
Reference in new issue
Block a user