mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-11 12:33:53 -06:00
fix: keep a test's installer run off the WSL side
test_install loads its own install module. Its free-space test ran main() in process without naming the OS, so on a WSL host main() entered WSL mode and left _WSL active in that module, for the rest of the process. Any test of the module run after it, as when the module is named twice on one command line, read D:\bios as /mnt/d/bios. The test now runs as Linux and restores _WSL on exit.
This commit is contained in:
1 parent
3cd5efdd53
commit
27c33b966e
1 file changed
+5
-1
@@ -428,7 +428,11 @@ class TheDataTreesCountInTheFreeSpace(unittest.TestCase):
|
||||
|
||||
member = os.urandom(4096)
|
||||
results = []
|
||||
with FakeRepository() as repo, unittest.mock.patch.dict(os.environ):
|
||||
# The run is a Linux one whatever the host: under WSL main() reads
|
||||
# the Windows side and keeps that in the module, where the Windows
|
||||
# detection tests run after it found D:\ turned into /mnt/d.
|
||||
with FakeRepository() as repo, unittest.mock.patch.dict(os.environ, RETROBIOS_OS="linux"), \
|
||||
unittest.mock.patch.dict(install._WSL):
|
||||
listed = json.loads((repo.root / "install" / "retroarch.json").read_text())
|
||||
listed["data_directories"] = [{
|
||||
"ref": "tree", "dest": "tree", "type": "zip", "archive_size": 50_000_000,
|
||||
|
||||
Reference in new issue
Block a user