-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using freezegun during threaded function causes an odd error #503
Comments
+1 also having this issue. |
+1 I have this issue as well. |
I ended up adding a setup sync step in my test code, where each thread does a serialized setup before being used for concurrent test code. |
I'm afraid I don't understand what you mean by that. |
You can create a wrapper function when freezing time in threads which wraps the freeze time call with a lock instead of calling freeze time directly. This force your threads to only freeze time one at a time. |
Could you please share a code snippet demonstrating your fix? |
I get this error: "'_freeze_time' object has no attribute 'fake_names'"
And this stacktrace:
Looking at the code it seems like
self.fake_names
is never populated, and maybe thatstart()
is not called?The text was updated successfully, but these errors were encountered: