-
Notifications
You must be signed in to change notification settings - Fork 0
/
pytest.ini
37 lines (30 loc) · 1.59 KB
/
pytest.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Pytest Configuration
# https://pytest-django.readthedocs.io/en/latest/tutorial.html#step-2-point-pytest-to-your-django-settings
[pytest]
DJANGO_SETTINGS_MODULE = "djangoboys.settings.dev"
python_files = test_*.py
# Disable warnings
# https://docs.pytest.org/en/stable/how-to/capture-warnings.html#disabling-warnings-summary
addopts = -p no:warnings
# Markers for marking, selecting specified tests
# https://docs.pytest.org/en/stable/how-to/mark.html#registering-marks
# Run tests by marker expressions:
# pytest -m <marker>
# example:
# pytest -m solo
# pytest -m models
# NOTE: There are also markers inherited from pytest-django
# e.g. django_db - This is used to mark a test function as requiring the database.
# Please see docs:
# https://pytest-django.readthedocs.io/en/latest/helpers.html#markers
markers =
skip_on_ci: marks tests as to be skipped on continuous integration (deselect with '-m "not skip_on_ci"')
slow: marks tests as slow (deselect with '-m "not slow"')
solo: mark test as single unit under test, that is, run this solo test only (deselect with '-m "not solo"')
current: mark tests as the current units under test (deselect with '-m "not current"')
non_db: mark test as test not requiring database access (deselect with '-m "not non_db"')
models: mark test as a model test (deselect with '-m "not models"')
views: mark test as a view test (deselect with '-m "not views"')
django_views: mark test as a django view test (deselect with '-m "not django_views"')
api_views: mark test as a rest framekowrk api view test (deselect with '-m "not api_views"')
serial