Our great sponsors
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
doublex
We haven't tracked posts mentioning doublex yet.
Tracking mentions began in Dec 2020.
freezegun
-
About time: how to unit test code that depends on time
* in C++.
On Python, just use freezegun to inject controllable timestamps in response to calls to time methods.
- Microsoft Exchange stops passing mail due to bug on 1/1/22
-
Python: Please stop screwing over Linux distros
For example, freezegun which is a common testing utility.
-
Mocking Python datetime In Tests With FreezeGun
FreezeGun is a library that helps with mocking out the datetime.datetime.now function. It is a very useful tool for testing code that uses the datetime library.
-
Introduction to Flaky Tests by Example
Another way of doing so would be to inject the value directly to the method. Python has a very good library to sandbox the tests when using the built-in datetime objects: freezegun. Once again, and unfortunately for us, the project was using arrow so this was not a possibility.
What are some alternatives?
time-machine - Travel through time in your tests.
python-libfaketime - A fast time mocking alternative to freezegun that wraps libfaketime.
Moto - A library that allows you to easily mock out tests based on AWS infrastructure.
VCR.py - Automatically mock your HTTP interactions to simplify and speed up testing
httpretty - Intercept HTTP requests at the Python socket level. Fakes the whole socket module
mock - The Python mock library
Mocket - a socket mock framework - for all kinds of socket animals, web-clients included
httmock - A mocking library for requests
responses - A utility for mocking out the Python Requests library.