From 4468f5f39d365e78f8ecad3dd789528d60343bc0 Mon Sep 17 00:00:00 2001 From: Terry Golubiewski Date: Wed, 25 Nov 2026 01:30:16 -0600 Subject: [PATCH] fix(test): discover and run JSON tests on Python 3 Signed-off-by: Terry Golubiewski --- test/basetest/utils.py | 2 +- test/json_test.t | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/test/basetest/utils.py b/test/basetest/utils.py index 786eeec2..82e0e8f5 100644 --- a/test/basetest/utils.py +++ b/test/basetest/utils.py @@ -134,7 +134,7 @@ def _retrieve_output(thread, timeout, queue, thread_error): """ # Try to join the thread on failure abort thread.join(timeout) - if thread.isAlive(): + if thread.is_alive(): # Join should have killed the thread. This is unexpected raise TimeoutWaitingFor(thread_error + ". Unexpected error") diff --git a/test/json_test.t b/test/json_test.t index bcfb5b81..66b61eab 100755 --- a/test/json_test.t +++ b/test/json_test.t @@ -64,9 +64,7 @@ class MetaTestJson(MetaTest): return test -class TestJsonParsing(TestCase): - __metaclass__ = MetaTestJson - +class TestJsonParsing(TestCase, metaclass=MetaTestJson): EXTRA = {} EXTRA["TEST_DIR"] = os.path.abspath(os.path.join(CURRENT_DIR, "..")) EXTRA["TEST_BIN"] = os.path.join(EXTRA["TEST_DIR"], "json_test")