reprotest and test using freezegun.freeze_time
I am packaging a package which unit tests such as the example below fail:
@freeze_time("2020-03-10")
def test_allowed_today(self):
a = alerter.Alerter({"days": "1"})
> self.assertTrue(a._allowed_today())
E AssertionError: False is not true
tests/test_alerter.py:155: AssertionError
The decorator @freeze_time
is from python3-freezegun
package.
Its implementation does:
# Change the modules
datetime.datetime = FakeDatetime
datetime.date = FakeDate
When running in reprotest they fail. Using --vary=-time
fail as well (and I'd like to avoid it).
Is there any pattern to run reprotest on packages which unit tests use freezegun (or other similar tools?).
Any example would be welcomed, or other ideas to fix the problem before I investigate too much (I thought that might be a known problem).
If there is a better venue to ask this question let me know (mailing list or somewhere else).
Thanks!