diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index dd61b0513..46a74fe27 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -8,9 +8,9 @@ Run this script with -h or --help for documentation. import os import sys - from test.libregrtest.main import main + # Alias for backward compatibility (just in case) main_in_temp_cwd = main diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index 92b81d158..5a8fccf59 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -3121,6 +3121,10 @@ class ThreadingMixin(Base): return ret_value + def _increment_mock_call(self, /, *args, **kwargs): + with self._mock_calls_events_lock: + super()._increment_mock_call(*args, **kwargs) + def wait_until_called(self, *, timeout=_timeout_unset): """Wait until the mock object is called.