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

Please "register" the "freeze_time" mark with pytest #13

Closed
dimaqq opened this issue Jun 3, 2019 · 2 comments · Fixed by #20
Closed

Please "register" the "freeze_time" mark with pytest #13

dimaqq opened this issue Jun 3, 2019 · 2 comments · Fixed by #20

Comments

@dimaqq
Copy link

dimaqq commented Jun 3, 2019

pytest says:

site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.freeze_time - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
PytestUnknownMarkWarning,

@retr0h
Copy link

retr0h commented Dec 14, 2019

Can we get this issue fixed?

@juanifioren
Copy link

@dimaqq Meanwhile I think doing this change you can remove the warning. Change:

@pytest.mark.freeze_time('2017-05-10')
def test_something(now, freezer):
    # code ...
    freezer.move_to('2017-06-10')  # One month later!.
    # code ...

to:

def test_something(now, freezer):
    freezer.move_to('2017-05-10')  # Today!
    # code ...
    freezer.move_to('2017-06-10')  # One month later!.
    # code ...

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.

3 participants