forked from opendatahub-io/notebooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpytest.ini
More file actions
57 lines (47 loc) · 2.23 KB
/
pytest.ini
File metadata and controls
57 lines (47 loc) · 2.23 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# https://docs.pytest.org/en/7.1.x/reference/reference.html#configuration-options
[pytest]
# https://docs.pytest.org/en/stable/how-to/doctest.html
# https://docs.pytest.org/en/stable/example/pythoncollection.html#ignore-paths-during-test-collection
addopts =
--strict-markers --capture=no --tb=short
--doctest-modules
--cov --cov-branch --cov-report=term-missing --cov-report=xml:coverage.xml
--junitxml=junit.xml -o junit_family=legacy
# Directories to collect tests from (speeds up collection significantly).
#
# tests/containers is excluded from default collection on purpose: those modules
# import docker, kubernetes, and testcontainers at import time, which costs ~1.5s
# during collection even when you only want the rest of the suite. CI and local
# runs that do not need cluster/container tests stay fast.
#
# That exclusion is implemented as collect_ignore in tests/conftest.py, not here:
# pytest only documents collect_ignore as a conftest/module variable. Putting
# collect_ignore in this file does nothing and pytest 9+ emits
# PytestConfigWarning: Unknown config option: collect_ignore.
#
# Run container tests when needed: pytest tests/containers --image=...
testpaths = tests ntb
# Test discovery patterns (explicit defaults for documentation)
python_files = test_*.py *_test.py
python_classes = Test*
python_functions = test_*
# https://docs.pytest.org/en/stable/example/pythoncollection.html#changing-directory-recursion
norecursedirs = .git .venv tmp node_modules __pycache__
cache_dir = .pytest_cache
# pytest-subtest plugin is built-in since pytest 9.0: https://docs.pytest.org/en/stable/how-to/subtests.html
required_plugins =
junit_logging = all
junit_log_passing_tests = False
log_cli = True
log_cli_date_format = %Y-%m-%d %H:%M:%S
log_cli_format = %(asctime)s %(levelname)s %(message)s
log_cli_level = INFO
log_file = logs/pytest-logs.txt
log_file_level = DEBUG
# https://docs.pytest.org/en/stable/example/markers.html#registering-markers
markers =
openshift: requires openshift to run,
cuda: requires cuda to run,
rocm: requires rocm to run,
buildonlytest: runs inside docker build,
manifest_validation: validates manifest annotations against actual image content (slow; needs cosign/skopeo or container runtime),