Skip to content
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

use freezegun instead of MockedClock #303

Open
nschloe opened this issue Jan 16, 2025 · 4 comments · May be fixed by #308
Open

use freezegun instead of MockedClock #303

nschloe opened this issue Jan 16, 2025 · 4 comments · May be fixed by #308

Comments

@nschloe
Copy link

nschloe commented Jan 16, 2025

See https://pypi.org/project/freezegun/.

Would save the clock argument in the Controller which is only used for testing anyway. The code could properly use datetime.now().

@karpetrosyan
Copy link
Owner

Yep, I should agree with you. At first, I was avoiding any external dependencies, but now it looks so complicated for tests.

@nschloe
Copy link
Author

nschloe commented Jan 17, 2025

It's only a test dependency too.

@karpetrosyan
Copy link
Owner

Would you like to issue a pull request?

@nschloe
Copy link
Author

nschloe commented Jan 20, 2025

If time permits, I'll do it. First I'll have to get things up and running though.

@nschloe nschloe linked a pull request Jan 21, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants