From c7493ed7bffdfb81c53989aba15e8389866bb08e Mon Sep 17 00:00:00 2001 From: dreamer Date: Fri, 20 Dec 2024 22:19:39 +0100 Subject: [PATCH] fix tests --- .gitignore | 3 +++ tests/framework/base_test.py | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 16d04f22..0474eb24 100644 --- a/.gitignore +++ b/.gitignore @@ -56,6 +56,9 @@ coverage.xml .pytest_cache/ cover/ +# Unit test output +tests/src/create_test_midi + # Translations *.mo *.pot diff --git a/tests/framework/base_test.py b/tests/framework/base_test.py index 31a19ff0..207393fb 100644 --- a/tests/framework/base_test.py +++ b/tests/framework/base_test.py @@ -69,7 +69,7 @@ def _run_hvcc( # TODO(mhroth): standardise how errors and warnings are returned between stages if r.notifs.has_error: if r.stage == "pd2hv": - self.fail(hvcc_results["pd2hv"].notifs.errors[0]) + self.fail(hvcc_results.root["pd2hv"].notifs.errors[0]) else: self.fail(str(r.notifs)) @@ -77,7 +77,7 @@ def _run_hvcc( for r in hvcc_results.root.values(): if r.stage == "pd2hv": self.assertTrue( - expected_enum in [w.enum for w in hvcc_results["pd2hv"].notifs.warnings] + expected_enum in [w.enum for w in hvcc_results.root["pd2hv"].notifs.warnings] ) return @@ -85,10 +85,10 @@ def _run_hvcc( if expect_fail and r.notifs.has_error: if r.stage == "pd2hv": - self.assertTrue(expected_enum in [e.enum for e in hvcc_results["pd2hv"].notifs.errors]) + self.assertTrue(expected_enum in [e.enum for e in hvcc_results.root["pd2hv"].notifs.errors]) return elif r.stage == "hvcc": - if len(hvcc_results["hvcc"].notifs.errors) > 0: + if len(hvcc_results.root["hvcc"].notifs.errors) > 0: return # hvcc isn't using Notification enums so just pass self.fail(f"Expected error enum: {expected_enum}")