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")