-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fake.time_delta is always datetime.timedelta(0) #2077
Comments
This has been changed in #907 and only occurs when running this without faker/faker/providers/date_time/__init__.py Lines 1837 to 1846 in 554d1aa
|
Thanks for the reply and the additional context @stefan6419846! While #907 does improve the behavior with As an example, this wouldn't be considered acceptable: >>> for _ in range(5):
>>> print(fake.pyint())
0
0
0
0
0 |
I think we need to change the signature of |
I can submit a patch for that. |
I'm not sure I understand why this is the case. But the expected behvaior as described in the documentation is that
fake.time_delta()
always returnstimedelta(0)
. I would expect this to be randomized like all the other fake values we generate. If this is intentional, please let me know. I couldn't discussions around this behavior.Actual behavior
Expected behavior
The result should be
Workaround
I am more than happy to submit a patch if this needs to be fixed.
The text was updated successfully, but these errors were encountered: