Update docs.
[python_utils.git] / tests / run_tests.py
index c96f882bb3d76306a2932aeb01d047b177fea456..6d6c0b8b97ed0181589f9f71154a8c0a00a0877b 100755 (executable)
@@ -141,6 +141,7 @@ class TestRunner(ABC, thread_utils.ThreadWithReturnValue):
             tests_timed_out=[],
         )
         self.tests_started = 0
+        self.lock = threading.Lock()
 
     @abstractmethod
     def get_name(self) -> str:
@@ -149,7 +150,8 @@ class TestRunner(ABC, thread_utils.ThreadWithReturnValue):
 
     def get_status(self) -> Tuple[int, TestResults]:
         """Ask the TestRunner for its status."""
-        return (self.tests_started, self.test_results)
+        with self.lock:
+            return (self.tests_started, self.test_results)
 
     @abstractmethod
     def begin(self, params: TestingParameters) -> TestResults:
@@ -406,8 +408,7 @@ def code_coverage_report():
     out = exec_utils.cmd('coverage report --omit=config-3.8.py,*_test.py,*_itest.py --sort=-cover')
     print(out)
     print(
-        """
-To recall this report w/o re-running the tests:
+        """To recall this report w/o re-running the tests:
 
     $ coverage report --omit=config-3.8.py,*_test.py,*_itest.py --sort=-cover