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

Register mark with pytest #20

Merged
merged 3 commits into from Jan 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions pytest_freezegun.py
Expand Up @@ -43,5 +43,11 @@ def pytest_runtest_teardown(self):
self.freezer = None
self.frozen_time = None

# pylint: disable=no-self-use
def pytest_load_initial_conftests(self, early_config):
early_config.addinivalue_line(
"markers", "freeze_time: Freeze time using freezegun.",
)


plugin = FreezegunPlugin()
1 change: 1 addition & 0 deletions tox.ini
Expand Up @@ -5,6 +5,7 @@ envlist = {py27,py34,py35,py36,pypy}-{pt3,pt4},flake8
[testenv]
deps =
coverage
pip >= 19
pt3: pytest>=3,<4
pt4: pytest>=4,<5
commands = coverage run -p -m pytest tests/ {posargs}
Expand Down