From d200356d7a3ffc500be556f1919a71fb0450bfe2 Mon Sep 17 00:00:00 2001 From: Connor Clark Date: Sun, 20 Aug 2023 12:07:07 -0700 Subject: [PATCH] test: make copy of playground.qst for quick assign test --- tests/test_zquest.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/test_zquest.py b/tests/test_zquest.py index b0cfe8648d..fe83010a34 100644 --- a/tests/test_zquest.py +++ b/tests/test_zquest.py @@ -91,13 +91,20 @@ def test_zquest_compile_and_quick_assign(self): ] (run_target.get_build_folder() / 'includepaths.txt').write_text(';'.join(include_paths)) + # Make copy of playground.qst + qst_path = tmp_dir / 'playground.qst' + shutil.copy(root_dir / 'tests/replays/playground.qst', qst_path) + # Re-compile and assign slots. - self.quick_assign(root_dir / 'tests/replays/playground.qst') + self.quick_assign(qst_path) # Ensure replays continue to pass. - for replay_path in (root_dir / 'tests/replays').glob('playground_*.zplay'): - with self.subTest(msg=f'{replay_path.name}'): - output_dir = tmp_dir / 'output' / replay_path.name + for original_replay_path in (root_dir / 'tests/replays').glob('playground_*.zplay'): + with self.subTest(msg=f'{original_replay_path.name}'): + replay_path = tmp_dir / 'tmp.zplay' + shutil.copy(original_replay_path, replay_path) + + output_dir = tmp_dir / 'output' / original_replay_path.name output_dir.mkdir(exist_ok=True, parents=True) self.run_replay(output_dir, [replay_path])