Add custom command line options.
(parser)
| 127 | |
| 128 | # Command line options |
| 129 | def pytest_addoption(parser): |
| 130 | """Add custom command line options.""" |
| 131 | parser.addoption( |
| 132 | "--run-slow", |
| 133 | action="store_true", |
| 134 | default=False, |
| 135 | help="Run slow tests" |
| 136 | ) |
| 137 | parser.addoption( |
| 138 | "--run-network", |
| 139 | action="store_true", |
| 140 | default=False, |
| 141 | help="Run tests that require network access" |
| 142 | ) |
| 143 | |
| 144 | def pytest_runtest_setup(item): |
| 145 | """Setup hook to skip tests based on markers and options.""" |
nothing calls this directly
no outgoing calls
no test coverage detected