1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-24 09:18:08 +00:00

Fix IOU test run on Windows

This commit is contained in:
Julien Duponchelle 2017-04-18 16:21:45 +02:00
parent 54014ccd39
commit c72ae1bfe7
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -16,6 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import os import os
import sys
from unittest.mock import patch from unittest.mock import patch
@ -105,6 +106,7 @@ def test_list_images(tmpdir):
path = tmpdir / "images2" / "test_invalid.image" path = tmpdir / "images2" / "test_invalid.image"
path.write(b'NOTANELF', ensure=True) path.write(b'NOTANELF', ensure=True)
if sys.platform.startswith("linux"):
path3 = tmpdir / "images1" / "IOU" / "test3.bin" path3 = tmpdir / "images1" / "IOU" / "test3.bin"
path3.write(b'\x7fELF\x01\x02\x01', ensure=True) path3.write(b'\x7fELF\x01\x02\x01', ensure=True)
path3 = force_unix_path(str(path3)) path3 = force_unix_path(str(path3))
@ -137,6 +139,7 @@ def test_list_images(tmpdir):
} }
] ]
if sys.platform.startswith("linux"):
assert list_images("iou") == [ assert list_images("iou") == [
{ {
'filename': 'test3.bin', 'filename': 'test3.bin',