-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
pytest.ini
97 lines (90 loc) · 5.02 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# --------------------( LICENSE )--------------------
# Copyright (c) 2014-2020 Cecil Curry.
# See "LICENSE" for further details.
#
# --------------------( SYNOPSIS )--------------------
# Project-wide "pytest.ini" configuration, applied to all invocations of
# the pytest test runner within this project -- including both by directly
# running the external "pytest" command and by indirectly running the
# setuptools-harnessed "python3 setup.py test" subcommand.
#
# --------------------( DETAILS )--------------------
# To permit tests to transparently import from the main non-test codebase, this
# file resides in the root project directory. pytest then:
#
# 1. Recursively finds this file.
# 2. Sets "config.inifile" to the absolute path of this file.
# 3. Sets "config.rootdir" to the absolute path of this file's directory.
#
# See https://pytest.org/latest/customize.html for details.
# ....................{ BOILERPLATE }...................
# The following pytest-specific section specifier is mandatory, despite this
# file's unambiguous basename of "pytest.ini". One is enraged by bureaucracy!
[pytest]
# Newline-delimited list of all custom marks applied by this test suite.
# Failing to explicitly list such marks here induces non-fatal warnings: e.g.,
# /usr/lib64/python3.6/site-packages/_pytest/mark/structures.py:335
# /usr/lib64/python3.6/site-packages/_pytest/mark/structures.py:335:
# PytestUnknownMarkWarning: Unknown pytest.mark.noop - is this a typo?
# You can register custom marks to avoid this warning - for details, see
# https://docs.pytest.org/en/latest/mark.html
# PytestUnknownMarkWarning,
markers =
noop: meaningless placeholder mark required to conditionally skip tests
# ....................{ OPTIONS }...................
#FIXME: Conditionally support the following plugin-based options in an
#appropriate setuptools command when the requisite plugin is importable:
#
#* "--instafail", immediately printing test output rather than delaying such
# output until after all tests complete. This requires the "pytest-instafail"
# plugin. Note that this may not necessarily play nicely with the
# "--capture=no" option leveraged below. Consider further testing.
#FIXME: Pass "--ff" and "--tb=auto" when all test machines have a sufficiently
#new version of pytest installed.
# Unconditionally pass the following command-line options to all invocations of
# the "pytest" command. Dismantled, this is:
#
# * "-v", increasing verbosity.
# * "-p no:xvfb", disabling the "pytest-xvfb" plugin for this CLI-only project.
# Although technically harmless, this plugin unconditionally logs extraneous
# messages that hamper readability of pytest output. Ergo, it goes.
# * "-r a", increasing verbosity of (a)ll types of test summaries.
# * "--doctest-glob=", disabling implicit detection of doctests (i.e., tests
# embedded in docstrings that double as human-readable examples). By default,
# pytest runs all files matching the recursive glob "**/test*.txt" through
# the standard "doctest" module. Since this project employs explicit tests
# rather than implicit doctests, this detection is a non-fatal noop in the
# best case and a fatal conflict in the worst case. For collective sanity,
# this detection *MUST* be disabled.
# * "--failed-first", prioritizing tests that failed ahead of tests that
# succeeded on the most recent test run. Actually, this option has been
# temporarily omitted. Why? Because serial tests currently fail to implicitly
# require prerequisite tests (e.g., "test_cli_sim_default[sim]" fails to
# require "test_cli_sim_default[seed]"), thus requiring that tests be run
# *ONLY* in the default ordering.
# * "--showlocals", printing local variable values in tracebacks.
# * "--tb=native", printing tracebacks in the same manner as tracebacks printed
# by Python itself for uncaught exceptions. By default, pytest prints
# tracebacks in an extremely colourful (which is nice) but unreadable (which
# is *NOT* nice) manner.
#
# See "pytest --help | less" for further details on available options.
addopts = -v -p no:xvfb -r a --doctest-glob= --showlocals
#addopts = -v -p no:xvfb -r a --doctest-glob= --showlocals --tb=native
# Minimum version of pytest required by:
#
# * The "--failed-first" option enabled by default above.
# minversion = 2.8.0
# Whitespace-delimited list of the relative paths of all top-level directories
# containing tests. All Python scripts with basenames prefixed by "test_" in
# all subdirectories of these directories including these directories
# themselves will be parsed for:
#
# * Functions whose names are prefixed by "test_".
# * Classes whose names are prefixed by "Test".
testpaths = beartype_test
# ....................{ OPTIONS ~ plugin }...................
# Options specific to third-party pytest plugins.
#
# Command-line options pertaining to plugins include:
# $ pytest --trace-config # List all active and available plugins.