duty 1.6.0__py3-none-any.whl → 1.6.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- duty/__init__.py +49 -2
- duty/__main__.py +1 -1
- duty/_internal/__init__.py +0 -0
- duty/_internal/callables/__init__.py +34 -0
- duty/{callables → _internal/callables}/_io.py +2 -0
- duty/_internal/callables/autoflake.py +132 -0
- duty/_internal/callables/black.py +176 -0
- duty/_internal/callables/blacken_docs.py +92 -0
- duty/_internal/callables/build.py +76 -0
- duty/_internal/callables/coverage.py +716 -0
- duty/_internal/callables/flake8.py +222 -0
- duty/_internal/callables/git_changelog.py +178 -0
- duty/_internal/callables/griffe.py +227 -0
- duty/_internal/callables/interrogate.py +152 -0
- duty/_internal/callables/isort.py +573 -0
- duty/_internal/callables/mkdocs.py +256 -0
- duty/_internal/callables/mypy.py +496 -0
- duty/_internal/callables/pytest.py +475 -0
- duty/_internal/callables/ruff.py +399 -0
- duty/_internal/callables/safety.py +82 -0
- duty/_internal/callables/ssort.py +38 -0
- duty/_internal/callables/twine.py +284 -0
- duty/_internal/cli.py +322 -0
- duty/_internal/collection.py +246 -0
- duty/_internal/context.py +111 -0
- duty/{debug.py → _internal/debug.py} +13 -15
- duty/_internal/decorator.py +111 -0
- duty/_internal/exceptions.py +12 -0
- duty/_internal/tools/__init__.py +41 -0
- duty/{tools → _internal/tools}/_autoflake.py +8 -4
- duty/{tools → _internal/tools}/_base.py +15 -2
- duty/{tools → _internal/tools}/_black.py +5 -5
- duty/{tools → _internal/tools}/_blacken_docs.py +10 -5
- duty/{tools → _internal/tools}/_build.py +4 -4
- duty/{tools → _internal/tools}/_coverage.py +8 -4
- duty/{tools → _internal/tools}/_flake8.py +10 -12
- duty/{tools → _internal/tools}/_git_changelog.py +8 -4
- duty/{tools → _internal/tools}/_griffe.py +8 -4
- duty/{tools → _internal/tools}/_interrogate.py +4 -4
- duty/{tools → _internal/tools}/_isort.py +8 -6
- duty/{tools → _internal/tools}/_mkdocs.py +8 -4
- duty/{tools → _internal/tools}/_mypy.py +5 -5
- duty/{tools → _internal/tools}/_pytest.py +8 -4
- duty/{tools → _internal/tools}/_ruff.py +11 -5
- duty/{tools → _internal/tools}/_safety.py +13 -8
- duty/{tools → _internal/tools}/_ssort.py +10 -6
- duty/{tools → _internal/tools}/_twine.py +11 -5
- duty/_internal/tools/_yore.py +96 -0
- duty/_internal/validation.py +266 -0
- duty/callables/__init__.py +4 -4
- duty/callables/autoflake.py +11 -126
- duty/callables/black.py +12 -171
- duty/callables/blacken_docs.py +11 -86
- duty/callables/build.py +12 -71
- duty/callables/coverage.py +12 -711
- duty/callables/flake8.py +12 -217
- duty/callables/git_changelog.py +12 -173
- duty/callables/griffe.py +12 -222
- duty/callables/interrogate.py +12 -147
- duty/callables/isort.py +12 -568
- duty/callables/mkdocs.py +12 -251
- duty/callables/mypy.py +11 -490
- duty/callables/pytest.py +12 -470
- duty/callables/ruff.py +12 -394
- duty/callables/safety.py +11 -76
- duty/callables/ssort.py +12 -33
- duty/callables/twine.py +12 -279
- duty/cli.py +10 -316
- duty/collection.py +12 -228
- duty/context.py +12 -107
- duty/decorator.py +12 -108
- duty/exceptions.py +13 -10
- duty/tools.py +63 -0
- duty/validation.py +12 -262
- {duty-1.6.0.dist-info → duty-1.6.1.dist-info}/METADATA +4 -3
- duty-1.6.1.dist-info/RECORD +81 -0
- {duty-1.6.0.dist-info → duty-1.6.1.dist-info}/WHEEL +1 -1
- {duty-1.6.0.dist-info → duty-1.6.1.dist-info}/entry_points.txt +1 -1
- duty/tools/__init__.py +0 -50
- duty/tools/_yore.py +0 -54
- duty-1.6.0.dist-info/RECORD +0 -55
- {duty-1.6.0.dist-info → duty-1.6.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
# YORE: Bump 2: Remove file.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Literal
|
|
6
|
+
|
|
7
|
+
from failprint import lazy
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@lazy(name="pytest")
|
|
11
|
+
def run(
|
|
12
|
+
*paths: str,
|
|
13
|
+
config_file: str | None = None,
|
|
14
|
+
select: str | None = None,
|
|
15
|
+
select_markers: str | None = None,
|
|
16
|
+
markers: bool | None = None,
|
|
17
|
+
exitfirst: bool | None = None,
|
|
18
|
+
fixtures: bool | None = None,
|
|
19
|
+
fixtures_per_test: bool | None = None,
|
|
20
|
+
pdb: bool | None = None,
|
|
21
|
+
pdbcls: str | None = None,
|
|
22
|
+
trace: bool | None = None,
|
|
23
|
+
capture: str | None = None,
|
|
24
|
+
runxfail: bool | None = None,
|
|
25
|
+
last_failed: bool | None = None,
|
|
26
|
+
failed_first: bool | None = None,
|
|
27
|
+
new_first: bool | None = None,
|
|
28
|
+
cache_show: str | None = None,
|
|
29
|
+
cache_clear: bool | None = None,
|
|
30
|
+
last_failed_no_failures: Literal["all", "none"] | None = None,
|
|
31
|
+
stepwise: bool | None = None,
|
|
32
|
+
stepwise_skip: bool | None = None,
|
|
33
|
+
durations: int | None = None,
|
|
34
|
+
durations_min: int | None = None,
|
|
35
|
+
verbose: bool | None = None,
|
|
36
|
+
no_header: bool | None = None,
|
|
37
|
+
no_summary: bool | None = None,
|
|
38
|
+
quiet: bool | None = None,
|
|
39
|
+
verbosity: int | None = None,
|
|
40
|
+
show_extra_summary: str | None = None,
|
|
41
|
+
disable_pytest_warnings: bool | None = None,
|
|
42
|
+
showlocals: bool | None = None,
|
|
43
|
+
no_showlocals: bool | None = None,
|
|
44
|
+
traceback: Literal["auto", "long", "short", "line", "native", "no"] | None = None,
|
|
45
|
+
show_capture: Literal["no", "stdout", "stderr", "log", "all"] | None = None,
|
|
46
|
+
full_trace: bool | None = None,
|
|
47
|
+
color: str | None = None,
|
|
48
|
+
code_highlight: bool | None = None,
|
|
49
|
+
pastebin: str | None = None,
|
|
50
|
+
junit_xml: str | None = None,
|
|
51
|
+
junit_prefix: str | None = None,
|
|
52
|
+
pythonwarnings: str | None = None,
|
|
53
|
+
maxfail: int | None = None,
|
|
54
|
+
strict_config: bool | None = None,
|
|
55
|
+
strict_markers: bool | None = None,
|
|
56
|
+
continue_on_collection_errors: bool | None = None,
|
|
57
|
+
rootdir: str | None = None,
|
|
58
|
+
collect_only: bool | None = None,
|
|
59
|
+
pyargs: bool | None = None,
|
|
60
|
+
ignore: list[str] | None = None,
|
|
61
|
+
ignore_glob: list[str] | None = None,
|
|
62
|
+
deselect: str | None = None,
|
|
63
|
+
confcutdir: str | None = None,
|
|
64
|
+
noconftest: bool | None = None,
|
|
65
|
+
keep_duplicates: bool | None = None,
|
|
66
|
+
collect_in_virtualenv: bool | None = None,
|
|
67
|
+
import_mode: Literal["prepend", "append", "importlib"] | None = None,
|
|
68
|
+
doctest_modules: bool | None = None,
|
|
69
|
+
doctest_report: Literal["none", "cdiff", "ndiff", "udiff", "only_first_failure"] | None = None,
|
|
70
|
+
doctest_glob: str | None = None,
|
|
71
|
+
doctest_ignore_import_errors: bool | None = None,
|
|
72
|
+
doctest_continue_on_failure: bool | None = None,
|
|
73
|
+
basetemp: str | None = None,
|
|
74
|
+
plugins: list[str] | None = None,
|
|
75
|
+
no_plugins: list[str] | None = None,
|
|
76
|
+
trace_config: bool | None = None,
|
|
77
|
+
debug: str | None = None,
|
|
78
|
+
override_ini: str | None = None,
|
|
79
|
+
assert_mode: str | None = None,
|
|
80
|
+
setup_only: bool | None = None,
|
|
81
|
+
setup_show: bool | None = None,
|
|
82
|
+
setup_plan: bool | None = None,
|
|
83
|
+
log_level: str | None = None,
|
|
84
|
+
log_format: str | None = None,
|
|
85
|
+
log_date_format: str | None = None,
|
|
86
|
+
log_cli_level: tuple[str, str] | None = None,
|
|
87
|
+
log_cli_format: str | None = None,
|
|
88
|
+
log_cli_date_format: str | None = None,
|
|
89
|
+
log_file: str | None = None,
|
|
90
|
+
log_file_level: str | None = None,
|
|
91
|
+
log_file_format: str | None = None,
|
|
92
|
+
log_file_date_format: str | None = None,
|
|
93
|
+
log_auto_indent: str | None = None,
|
|
94
|
+
) -> int:
|
|
95
|
+
"""Run `pytest`.
|
|
96
|
+
|
|
97
|
+
Parameters:
|
|
98
|
+
*paths: Files or directories to select tests from.
|
|
99
|
+
select: Only run tests which match the given substring expression. An expression is a Python evaluatable expression where all names are substring-matched against test names and their parent classes. Example: -k 'test_method or test_other' matches all test functions and classes whose name contains 'test_method' or 'test_other', while -k 'not test_method' matches those that don't contain 'test_method' in their names. -k 'not test_method and not test_other' will eliminate the matches. Additionally keywords are matched to classes and functions containing extra names in their 'extra_keyword_matches' set, as well as functions which have names assigned directly to them. The matching is case-insensitive.
|
|
100
|
+
select_markers: Only run tests matching given mark expression. For example: -m 'mark1 and not mark2'.
|
|
101
|
+
markers: show markers (builtin, plugin and per-project ones).
|
|
102
|
+
exitfirst: Exit instantly on first error or failed test
|
|
103
|
+
fixtures: Show available fixtures, sorted by plugin appearance (fixtures with leading '_' are only shown with '-v')
|
|
104
|
+
fixtures_per_test: Show fixtures per test
|
|
105
|
+
pdb: Start the interactive Python debugger on errors or KeyboardInterrupt
|
|
106
|
+
pdbcls: Specify a custom interactive Python debugger for use with --pdb.For example: --pdbcls IPython.terminal.debugger:TerminalPdb
|
|
107
|
+
trace: Immediately break when running each test
|
|
108
|
+
capture: Per-test capturing method: one of fd|sys|no|tee-sys
|
|
109
|
+
runxfail: Report the results of xfail tests as if they were not marked
|
|
110
|
+
last_failed: Rerun only the tests that failed at the last run (or all if none failed)
|
|
111
|
+
failed_first: Run all tests, but run the last failures first. This may re-order tests and thus lead to repeated fixture setup/teardown.
|
|
112
|
+
new_first: Run tests from new files first, then the rest of the tests sorted by file mtime
|
|
113
|
+
cache_show: Show cache contents, don't perform collection or tests. Optional argument: glob (default: '*').
|
|
114
|
+
cache_clear: Remove all cache contents at start of test run
|
|
115
|
+
last_failed_no_failures: Which tests to run with no previously (known) failures
|
|
116
|
+
stepwise: Exit on test failure and continue from last failing test next time
|
|
117
|
+
stepwise_skip: Ignore the first failing test but stop on the next failing test. Implicitly enables --stepwise.
|
|
118
|
+
durations: Show N slowest setup/test durations (N 0 for all)
|
|
119
|
+
durations_min: Minimal duration in seconds for inclusion in slowest list. Default: 0.005.
|
|
120
|
+
verbose: Increase verbosity
|
|
121
|
+
no_header: Disable header
|
|
122
|
+
no_summary: Disable summary
|
|
123
|
+
quiet: Decrease verbosity
|
|
124
|
+
verbosity: Set verbosity. Default: 0.
|
|
125
|
+
show_extra_summary: Show extra test summary info as specified by chars: (f)ailed, (E)rror, (s)kipped, (x)failed, (X)passed, (p)assed, (P)assed with output, (a)ll except passed (p/P), or (A)ll. (w)arnings are enabled by default (see --disable-warnings), 'N' can be used to reset the list. (default: 'fE').
|
|
126
|
+
disable_pytest_warnings: Disable warnings summary
|
|
127
|
+
showlocals: Show locals in tracebacks (disabled by default)
|
|
128
|
+
no_showlocals: Hide locals in tracebacks (negate --showlocals passed through addopts)
|
|
129
|
+
traceback: Traceback print mode (auto/long/short/line/native/no)
|
|
130
|
+
show_capture: Controls how captured stdout/stderr/log is shown on failed tests. Default: all.
|
|
131
|
+
full_trace: Don't cut any tracebacks (default is to cut)
|
|
132
|
+
color: Color terminal output (yes/no/auto)
|
|
133
|
+
code_highlight: {yes,no} Whether code should be highlighted (only if --color is also enabled). Default: yes.
|
|
134
|
+
pastebin: Send failed|all info to bpaste.net pastebin service
|
|
135
|
+
junit_xml: Create junit-xml style report file at given path
|
|
136
|
+
junit_prefix: Prepend prefix to classnames in junit-xml output
|
|
137
|
+
pythonwarnings: Set which warnings to report, see -W option of Python itself
|
|
138
|
+
maxfail: Exit after first num failures or errors
|
|
139
|
+
strict_config: Any warnings encountered while parsing the `pytest` section of the configuration file raise errors
|
|
140
|
+
strict_markers: Markers not registered in the `markers` section of the configuration file raise errors
|
|
141
|
+
config_file file: Load configuration from `file` instead of trying to locate one of the implicit configuration files
|
|
142
|
+
continue_on_collection_errors: Force test execution even if collection errors occur
|
|
143
|
+
rootdir: Define root directory for tests. Can be relative path: 'root_dir', './root_dir', 'root_dir/another_dir/'; absolute path: '/home/user/root_dir'; path with variables: '$HOME/root_dir'.
|
|
144
|
+
collect_only: Only collect tests, don't execute them
|
|
145
|
+
pyargs: Try to interpret all arguments as Python packages
|
|
146
|
+
ignore: Ignore path during collection (multi-allowed)
|
|
147
|
+
ignore_glob: Ignore path pattern during collection (multi-allowed)
|
|
148
|
+
deselect: Deselect item (via node id prefix) during collection (multi-allowed)
|
|
149
|
+
confcutdir: Only load conftest.py's relative to specified dir
|
|
150
|
+
noconftest: Don't load any conftest.py files
|
|
151
|
+
keep_duplicates: Keep duplicate tests
|
|
152
|
+
collect_in_virtualenv: Don't ignore tests in a local virtualenv directory
|
|
153
|
+
import_mode: Prepend/append to sys.path when importing test modules and conftest files. Default: prepend.
|
|
154
|
+
doctest_modules: Run doctests in all .py modules
|
|
155
|
+
doctest_report: Choose another output format for diffs on doctest failure
|
|
156
|
+
doctest_glob pat: Doctests file matching pattern, default: test*.txt
|
|
157
|
+
doctest_ignore_import_errors: Ignore doctest ImportErrors
|
|
158
|
+
doctest_continue_on_failure: For a given doctest, continue to run after the first failure
|
|
159
|
+
basetemp: Base temporary directory for this test run. (Warning: this directory is removed if it exists.)
|
|
160
|
+
plugins: Early-load given plugin module name or entry point (multi-allowed). To avoid loading of plugins, use the `no:` prefix, e.g. `no:doctest`.
|
|
161
|
+
no_plugins: Early-load given plugin module name or entry point (multi-allowed). To avoid loading of plugins, use the `no:` prefix, e.g. `no:doctest`.
|
|
162
|
+
trace_config: Trace considerations of conftest.py files
|
|
163
|
+
debug: Store internal tracing debug information in this log file. This file is opened with 'w' and truncated as a result, care advised. Default: pytestdebug.log.
|
|
164
|
+
override_ini: Override ini option with "option value" style, e.g. `-o xfail_strict True -o cache_dir cache`.
|
|
165
|
+
assert_mode: Control assertion debugging tools. 'plain' performs no assertion debugging. 'rewrite' (the default) rewrites assert statements in test modules on import to provide assert expression information.
|
|
166
|
+
setup_only: Only setup fixtures, do not execute tests
|
|
167
|
+
setup_show: Show setup of fixtures while executing tests
|
|
168
|
+
setup_plan: Show what fixtures and tests would be executed but don't execute anything
|
|
169
|
+
log_level: Level of messages to catch/display. Not set by default, so it depends on the root/parent log handler's effective level, where it is "WARNING" by default.
|
|
170
|
+
log_format: Log format used by the logging module.
|
|
171
|
+
log_date_format: Log date format used by the logging module.
|
|
172
|
+
log_cli_level: logging level.
|
|
173
|
+
log_cli_format: Log format used by the logging module.
|
|
174
|
+
log_cli_date_format: Log date format used by the logging module.
|
|
175
|
+
log_file: Path to a file when logging will be written to.
|
|
176
|
+
log_file_level: Log file logging level.
|
|
177
|
+
log_file_format: Log format used by the logging module.
|
|
178
|
+
log_file_date_format: Log date format used by the logging module.
|
|
179
|
+
log_auto_indent: Auto-indent multiline messages passed to the logging module. Accepts true|on, false|off or an integer.
|
|
180
|
+
"""
|
|
181
|
+
from pytest import main as pytest # noqa: PT013,PLC0415
|
|
182
|
+
|
|
183
|
+
cli_args = list(paths)
|
|
184
|
+
|
|
185
|
+
if select:
|
|
186
|
+
cli_args.append("-k")
|
|
187
|
+
cli_args.append(select)
|
|
188
|
+
|
|
189
|
+
if select_markers:
|
|
190
|
+
cli_args.append("-m")
|
|
191
|
+
cli_args.append(select_markers)
|
|
192
|
+
|
|
193
|
+
if markers:
|
|
194
|
+
cli_args.append("--markers")
|
|
195
|
+
|
|
196
|
+
if exitfirst:
|
|
197
|
+
cli_args.append("--exitfirst")
|
|
198
|
+
|
|
199
|
+
if fixtures:
|
|
200
|
+
cli_args.append("--fixtures")
|
|
201
|
+
|
|
202
|
+
if fixtures_per_test:
|
|
203
|
+
cli_args.append("--fixtures-per-test")
|
|
204
|
+
|
|
205
|
+
if pdb:
|
|
206
|
+
cli_args.append("--pdb")
|
|
207
|
+
|
|
208
|
+
if pdbcls:
|
|
209
|
+
cli_args.append("--pdbcls")
|
|
210
|
+
cli_args.append(pdbcls)
|
|
211
|
+
|
|
212
|
+
if trace:
|
|
213
|
+
cli_args.append("--trace")
|
|
214
|
+
|
|
215
|
+
if capture:
|
|
216
|
+
cli_args.append("--capture")
|
|
217
|
+
|
|
218
|
+
if runxfail:
|
|
219
|
+
cli_args.append("--runxfail")
|
|
220
|
+
|
|
221
|
+
if last_failed:
|
|
222
|
+
cli_args.append("--last-failed")
|
|
223
|
+
|
|
224
|
+
if failed_first:
|
|
225
|
+
cli_args.append("--failed-first")
|
|
226
|
+
|
|
227
|
+
if new_first:
|
|
228
|
+
cli_args.append("--new-first")
|
|
229
|
+
|
|
230
|
+
if cache_show:
|
|
231
|
+
cli_args.append("--cache-show")
|
|
232
|
+
cli_args.append(cache_show)
|
|
233
|
+
|
|
234
|
+
if cache_clear:
|
|
235
|
+
cli_args.append("--cache-clear")
|
|
236
|
+
|
|
237
|
+
if last_failed_no_failures:
|
|
238
|
+
cli_args.append("--last-failed-no-failures")
|
|
239
|
+
cli_args.append(last_failed_no_failures)
|
|
240
|
+
|
|
241
|
+
if stepwise:
|
|
242
|
+
cli_args.append("--stepwise")
|
|
243
|
+
|
|
244
|
+
if stepwise_skip:
|
|
245
|
+
cli_args.append("--stepwise-skip")
|
|
246
|
+
|
|
247
|
+
if durations:
|
|
248
|
+
cli_args.append("--durations")
|
|
249
|
+
cli_args.append(str(durations))
|
|
250
|
+
|
|
251
|
+
if durations_min:
|
|
252
|
+
cli_args.append("--durations-min")
|
|
253
|
+
cli_args.append(str(durations_min))
|
|
254
|
+
|
|
255
|
+
if verbose:
|
|
256
|
+
cli_args.append("--verbose")
|
|
257
|
+
|
|
258
|
+
if no_header:
|
|
259
|
+
cli_args.append("--no-header")
|
|
260
|
+
|
|
261
|
+
if no_summary:
|
|
262
|
+
cli_args.append("--no-summary")
|
|
263
|
+
|
|
264
|
+
if quiet:
|
|
265
|
+
cli_args.append("--quiet")
|
|
266
|
+
|
|
267
|
+
if verbosity:
|
|
268
|
+
cli_args.append("--verbosity")
|
|
269
|
+
cli_args.append(str(verbosity))
|
|
270
|
+
|
|
271
|
+
if show_extra_summary:
|
|
272
|
+
cli_args.append("-r")
|
|
273
|
+
cli_args.append(show_extra_summary)
|
|
274
|
+
|
|
275
|
+
if disable_pytest_warnings:
|
|
276
|
+
cli_args.append("--disable-pytest-warnings")
|
|
277
|
+
|
|
278
|
+
if showlocals:
|
|
279
|
+
cli_args.append("--showlocals")
|
|
280
|
+
|
|
281
|
+
if no_showlocals:
|
|
282
|
+
cli_args.append("--no-showlocals")
|
|
283
|
+
|
|
284
|
+
if traceback:
|
|
285
|
+
cli_args.append("--tb")
|
|
286
|
+
cli_args.append(traceback)
|
|
287
|
+
|
|
288
|
+
if show_capture:
|
|
289
|
+
cli_args.append("--show-capture")
|
|
290
|
+
cli_args.append(show_capture)
|
|
291
|
+
|
|
292
|
+
if full_trace:
|
|
293
|
+
cli_args.append("--full-trace")
|
|
294
|
+
|
|
295
|
+
if color:
|
|
296
|
+
cli_args.append("--color")
|
|
297
|
+
cli_args.append(color)
|
|
298
|
+
|
|
299
|
+
if code_highlight:
|
|
300
|
+
cli_args.append("--code-highlight")
|
|
301
|
+
|
|
302
|
+
if pastebin:
|
|
303
|
+
cli_args.append("--pastebin")
|
|
304
|
+
cli_args.append(pastebin)
|
|
305
|
+
|
|
306
|
+
if junit_xml:
|
|
307
|
+
cli_args.append("--junit-xml")
|
|
308
|
+
cli_args.append(junit_xml)
|
|
309
|
+
|
|
310
|
+
if junit_prefix:
|
|
311
|
+
cli_args.append("--junit-prefix")
|
|
312
|
+
cli_args.append(junit_prefix)
|
|
313
|
+
|
|
314
|
+
if pythonwarnings:
|
|
315
|
+
cli_args.append("--pythonwarnings")
|
|
316
|
+
cli_args.append(pythonwarnings)
|
|
317
|
+
|
|
318
|
+
if maxfail:
|
|
319
|
+
cli_args.append("--maxfail")
|
|
320
|
+
cli_args.append(str(maxfail))
|
|
321
|
+
|
|
322
|
+
if strict_config:
|
|
323
|
+
cli_args.append("--strict-config")
|
|
324
|
+
|
|
325
|
+
if strict_markers:
|
|
326
|
+
cli_args.append("--strict-markers")
|
|
327
|
+
|
|
328
|
+
if config_file:
|
|
329
|
+
cli_args.append("-c")
|
|
330
|
+
cli_args.append(config_file)
|
|
331
|
+
|
|
332
|
+
if continue_on_collection_errors:
|
|
333
|
+
cli_args.append("--continue-on-collection-errors")
|
|
334
|
+
|
|
335
|
+
if rootdir:
|
|
336
|
+
cli_args.append("--rootdir")
|
|
337
|
+
cli_args.append(rootdir)
|
|
338
|
+
|
|
339
|
+
if collect_only:
|
|
340
|
+
cli_args.append("--collect-only")
|
|
341
|
+
|
|
342
|
+
if pyargs:
|
|
343
|
+
cli_args.append("--pyargs")
|
|
344
|
+
|
|
345
|
+
if ignore:
|
|
346
|
+
for ign in ignore:
|
|
347
|
+
cli_args.append("--ignore")
|
|
348
|
+
cli_args.append(ign)
|
|
349
|
+
|
|
350
|
+
if ignore_glob:
|
|
351
|
+
for ign_glob in ignore_glob:
|
|
352
|
+
cli_args.append("--ignore-glob")
|
|
353
|
+
cli_args.append(ign_glob)
|
|
354
|
+
|
|
355
|
+
if deselect:
|
|
356
|
+
cli_args.append("--deselect")
|
|
357
|
+
cli_args.append(deselect)
|
|
358
|
+
|
|
359
|
+
if confcutdir:
|
|
360
|
+
cli_args.append("--confcutdir")
|
|
361
|
+
cli_args.append(confcutdir)
|
|
362
|
+
|
|
363
|
+
if noconftest:
|
|
364
|
+
cli_args.append("--noconftest")
|
|
365
|
+
|
|
366
|
+
if keep_duplicates:
|
|
367
|
+
cli_args.append("--keep-duplicates")
|
|
368
|
+
|
|
369
|
+
if collect_in_virtualenv:
|
|
370
|
+
cli_args.append("--collect-in-virtualenv")
|
|
371
|
+
|
|
372
|
+
if import_mode:
|
|
373
|
+
cli_args.append("--import-mode")
|
|
374
|
+
cli_args.append(import_mode)
|
|
375
|
+
|
|
376
|
+
if doctest_modules:
|
|
377
|
+
cli_args.append("--doctest-modules")
|
|
378
|
+
|
|
379
|
+
if doctest_report:
|
|
380
|
+
cli_args.append("--doctest-report")
|
|
381
|
+
cli_args.append(doctest_report)
|
|
382
|
+
|
|
383
|
+
if doctest_glob:
|
|
384
|
+
cli_args.append("--doctest-glob")
|
|
385
|
+
cli_args.append(doctest_glob)
|
|
386
|
+
|
|
387
|
+
if doctest_ignore_import_errors:
|
|
388
|
+
cli_args.append("--doctest-ignore-import-errors")
|
|
389
|
+
|
|
390
|
+
if doctest_continue_on_failure:
|
|
391
|
+
cli_args.append("--doctest-continue-on-failure")
|
|
392
|
+
|
|
393
|
+
if basetemp:
|
|
394
|
+
cli_args.append("--basetemp")
|
|
395
|
+
cli_args.append(basetemp)
|
|
396
|
+
|
|
397
|
+
if plugins:
|
|
398
|
+
for plugin in plugins:
|
|
399
|
+
cli_args.append("-p")
|
|
400
|
+
cli_args.append(plugin)
|
|
401
|
+
|
|
402
|
+
if no_plugins:
|
|
403
|
+
for no_plugin in no_plugins:
|
|
404
|
+
cli_args.append("-p")
|
|
405
|
+
cli_args.append(f"no:{no_plugin}")
|
|
406
|
+
|
|
407
|
+
if trace_config:
|
|
408
|
+
cli_args.append("--trace-config")
|
|
409
|
+
|
|
410
|
+
if debug:
|
|
411
|
+
cli_args.append("--debug")
|
|
412
|
+
cli_args.append(debug)
|
|
413
|
+
|
|
414
|
+
if override_ini:
|
|
415
|
+
cli_args.append("--override-ini")
|
|
416
|
+
cli_args.append(override_ini)
|
|
417
|
+
|
|
418
|
+
if assert_mode:
|
|
419
|
+
cli_args.append("--assert")
|
|
420
|
+
cli_args.append(assert_mode)
|
|
421
|
+
|
|
422
|
+
if setup_only:
|
|
423
|
+
cli_args.append("--setup-only")
|
|
424
|
+
|
|
425
|
+
if setup_show:
|
|
426
|
+
cli_args.append("--setup-show")
|
|
427
|
+
|
|
428
|
+
if setup_plan:
|
|
429
|
+
cli_args.append("--setup-plan")
|
|
430
|
+
|
|
431
|
+
if log_level:
|
|
432
|
+
cli_args.append("--log-level")
|
|
433
|
+
cli_args.append(log_level)
|
|
434
|
+
|
|
435
|
+
if log_format:
|
|
436
|
+
cli_args.append("--log-format")
|
|
437
|
+
cli_args.append(log_format)
|
|
438
|
+
|
|
439
|
+
if log_date_format:
|
|
440
|
+
cli_args.append("--log-date-format")
|
|
441
|
+
cli_args.append(log_date_format)
|
|
442
|
+
|
|
443
|
+
if log_cli_level:
|
|
444
|
+
cli_args.append("--log-cli-level")
|
|
445
|
+
cli_args.extend(log_cli_level)
|
|
446
|
+
|
|
447
|
+
if log_cli_format:
|
|
448
|
+
cli_args.append("--log-cli-format")
|
|
449
|
+
cli_args.append(log_cli_format)
|
|
450
|
+
|
|
451
|
+
if log_cli_date_format:
|
|
452
|
+
cli_args.append("--log-cli-date-format")
|
|
453
|
+
cli_args.append(log_cli_date_format)
|
|
454
|
+
|
|
455
|
+
if log_file:
|
|
456
|
+
cli_args.append("--log-file")
|
|
457
|
+
cli_args.append(log_file)
|
|
458
|
+
|
|
459
|
+
if log_file_level:
|
|
460
|
+
cli_args.append("--log-file-level")
|
|
461
|
+
cli_args.append(log_file_level)
|
|
462
|
+
|
|
463
|
+
if log_file_format:
|
|
464
|
+
cli_args.append("--log-file-format")
|
|
465
|
+
cli_args.append(log_file_format)
|
|
466
|
+
|
|
467
|
+
if log_file_date_format:
|
|
468
|
+
cli_args.append("--log-file-date-format")
|
|
469
|
+
cli_args.append(log_file_date_format)
|
|
470
|
+
|
|
471
|
+
if log_auto_indent:
|
|
472
|
+
cli_args.append("--log-auto-indent")
|
|
473
|
+
cli_args.append(log_auto_indent)
|
|
474
|
+
|
|
475
|
+
return pytest(cli_args)
|