mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 14:18:38 +00:00
tests: follow this round's merges (#433's Python 3.12 floor in the dry-run tests, #488's 8-word dump, #421's global offset test, reworded test-program error)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -191,7 +191,7 @@ class SkipAssetsAndStageIsolationTest(unittest.TestCase):
|
||||
mock_pipelines.assert_called_once()
|
||||
|
||||
def test_skip_assets_preflight_bypasses_dotnet_sdk_and_submodule_checks(self) -> None:
|
||||
with mock.patch("sys.version_info", (3, 11, 0)), \
|
||||
with mock.patch("sys.version_info", (3, 12, 0)), \
|
||||
mock.patch.object(make_game, "visual_cpp_tools_ok", return_value=True), \
|
||||
mock.patch.object(make_game, "dotnet_sdk_ok") as mock_dotnet, \
|
||||
mock.patch.object(make_game, "ensure_submodule") as mock_submodule, \
|
||||
@ -203,7 +203,7 @@ class SkipAssetsAndStageIsolationTest(unittest.TestCase):
|
||||
mock_submodule.assert_not_called()
|
||||
|
||||
def test_skip_assets_preflight_avoids_ffmpeg_requirement_even_when_wav_requested(self) -> None:
|
||||
with mock.patch("sys.version_info", (3, 11, 0)), \
|
||||
with mock.patch("sys.version_info", (3, 12, 0)), \
|
||||
mock.patch.object(make_game, "dotnet_sdk_ok", return_value=True), \
|
||||
mock.patch.object(make_game, "tool_available", return_value=True), \
|
||||
mock.patch("shutil.which", side_effect=lambda cmd: None if cmd == "ffmpeg" else "/bin/ok"), \
|
||||
@ -212,7 +212,7 @@ class SkipAssetsAndStageIsolationTest(unittest.TestCase):
|
||||
|
||||
def test_skip_assets_preflight_reduces_disk_space_requirement(self) -> None:
|
||||
stderr_buf = io.StringIO()
|
||||
with mock.patch("sys.version_info", (3, 11, 0)), \
|
||||
with mock.patch("sys.version_info", (3, 12, 0)), \
|
||||
mock.patch.object(make_game, "dotnet_sdk_ok", return_value=True), \
|
||||
mock.patch.object(make_game, "ensure_submodule"), \
|
||||
mock.patch.object(make_game, "tool_available", return_value=True), \
|
||||
@ -224,7 +224,7 @@ class SkipAssetsAndStageIsolationTest(unittest.TestCase):
|
||||
self.assertEqual(ctx.exception.code, 1)
|
||||
self.assertIn("330 GB is needed", stderr_buf.getvalue())
|
||||
|
||||
with mock.patch("sys.version_info", (3, 11, 0)), \
|
||||
with mock.patch("sys.version_info", (3, 12, 0)), \
|
||||
mock.patch.object(make_game, "tool_available", return_value=True), \
|
||||
mock.patch("shutil.which", return_value="/bin/ok"), \
|
||||
mock.patch("shutil.disk_usage", return_value=mock.Mock(free=50 * (2**30))):
|
||||
|
||||
@ -160,11 +160,10 @@ class BuildConfigurations(unittest.TestCase):
|
||||
self.assertRaises(SystemExit) as caught):
|
||||
run_gpu_tests.main()
|
||||
message = str(caught.exception)
|
||||
# names the build folder, says the configuration subfolders were searched, and lists what is missing
|
||||
self.assertIn(str(build), message)
|
||||
self.assertIn(str(rel), message)
|
||||
self.assertIn("RelWithDebInfo", message)
|
||||
self.assertIn("vk_harness" + ext, message)
|
||||
self.assertIn("--config RelWithDebInfo", message)
|
||||
self.assertIn("--target vk_compute_test vk_store_test vk_harness", message)
|
||||
|
||||
def test_main_passes_visual_studio_config_directory_to_suite(self):
|
||||
ext = ".exe" if os.name == "nt" else ""
|
||||
|
||||
@ -72,7 +72,7 @@ class Wave64Checks(unittest.TestCase):
|
||||
if name == "cs_smem_soffset_imm":
|
||||
return 0, "out[0..7] = " + " ".join(map(str, check.CS_SMEM)) + "\n"
|
||||
if name in WAVE32_WORDS: # wave32 dumps run on any subgroup size
|
||||
return 0, "out[0..7] = " + " ".join(map(str, WAVE32_WORDS[name])) + "\n"
|
||||
return 0, "out[0..7] = " + " ".join(map(str, (WAVE32_WORDS[name] + [0] * 8)[:8])) + "\n"
|
||||
if name == "cs_workgroup_yz": # #186: vk_compute_test's 2x3x4 Y/Z histogram line
|
||||
return 0, "2x3x4 workgroup Y/Z: 0 mismatches\n"
|
||||
if name in ("cs_imgstore", "cs_imgload"):
|
||||
|
||||
Reference in New Issue
Block a user