-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpytest.ini
66 lines (57 loc) · 2.06 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Pytest configuration
# https://docs.pytest.org/en/latest/example/markers.html
#
# run test with name querry 'stock_db_mgr':
# python -m pytest -v -k stock_db_mgr
#
# run test mark 'dummytest':
# python -m pytest -v -m dummytest
#
# logic works:
# python -m pytest -v -m 'dummytest and webtest'
#
# no webtest (local only):
# python -m pytest -v -m 'not webtest'
#
# only show test list (do not run them)
# python -m pytest -v --collect-only
#
# print meaningful information:
# python -m pytest -v -rfEsxXP --strict-markers
#
# With coverage:
# python -m coverage run -m pytest -v -m dummytest
[pytest]
# Default command line options:
# -r... # show all except regular pass
# https://docs.pytest.org/en/7.4.x/how-to/output.html
addopts = --strict-markers -rfEsxXP --junitxml=tests/results.xml
junit_suite_name = tradesim
################################################################################
# Markers configuration
markers =
dummytest: Not real tests, for practice only
webtest: These tests make http/https requests and need Internet access.
smoketest: Smoke tests broadly cover product features in a limited time
toimprove: Tests that exercise the code, but need improvement on actual functionality testing.
sideeffect: Tests that modify the local files or environment. They are missing proper teardown steps.
################################################################################
# Logging configuration
# Ref: https://docs.pytest.org/en/7.1.x/how-to/logging.html
### Global log
#log_level = DEBUG
log_level = INFO
#log_level = WARNING
#log_level = ERROR
#log_level = CRITICAL
log_format = %(asctime)s%(msecs)03d %(name)-6s %(levelname)-8s %(filename)s:%(lineno)d %(message)s
log_date_format=%Y-%m-%d %H:%M:%S.
### CLI options (for live log: more annoying)
#log_cli = true
#log_cli_level = DEBUG
#log_cli_level = INFO
#log_cli_level = WARNING
#log_cli_level = ERROR
#log_cli_level = CRITICAL
#log_cli_format = %(asctime)s%(msecs)03d %(name)-6s %(levelname)-8s %(filename)s:%(lineno)d %(message)s
#log_cli_date_format=%Y-%m-%d %H:%M:%S.