From 54373248c7000cdad36ab4b9ae2feeb6fb4c70b9 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 2 Oct 2021 13:37:33 +0100 Subject: Make the test portable --- tests/test_rom.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_rom.py b/tests/test_rom.py index 7ba6992..c378d23 100755 --- a/tests/test_rom.py +++ b/tests/test_rom.py @@ -2,6 +2,7 @@ import unittest import struct +from os import path class TestRom(unittest.TestCase): @@ -11,10 +12,10 @@ class TestRom(unittest.TestCase): @classmethod def setUpClass(cls): - with open("../bin/game.rom", "rb") as fd: + with open(path.join("..", "bin", "game.rom"), "rb") as fd: cls.data = fd.read(cls.ROM_SIZE) - with open("../game/build/game.map", "rb") as fd: + with open(path.join("..", "game", "build", "game.map"), "rb") as fd: game_map = fd.readlines() cls.main_init = 0 -- cgit v1.2.3