12345678910111213141516171819202122232425262728293031323334353637 |
- import os
- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings.testing")
- import pytest
- import django
- from .fixtures import *
- def pytest_addoption(parser):
- parser.addoption("--runslow", action="store_true", help="run slow tests")
- def pytest_runtest_setup(item):
- if "slow" in item.keywords and not item.config.getoption("--runslow"):
- pytest.skip("need --runslow option to run")
- def pytest_configure(config):
- django.setup()
|