You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The @time_freeze decorator does not work, when a module name starts with git and the test imports from that module.
Renaming the module (i.e. the folder and imports) to any string, which does not contains those three letters at the beginning, works.
I could reproduce the error with Python 3.10, see this minmal example.
I think this is because the string "gi" is in the default ignores list and the check in the ignore lists is pretty dumb, using str.startswith. Probably any module name which starts with "gi" will fail similarly.
The
@time_freeze
decorator does not work, when a module name starts withgit
and the test imports from that module.Renaming the module (i.e. the folder and imports) to any string, which does not contains those three letters at the beginning, works.
I could reproduce the error with Python 3.10, see this minmal example.
Minimal Example Code
Only freezegun as external dependency
git_module_name/minimal.py,
other_module_name/minimal.py
(exactly the same content in both)
test/test_minimal.py
Test Result
Running
python -m unittest tests.test_minimal.TimeTest
results in the first test failing and the second one passing:The text was updated successfully, but these errors were encountered: