This function is to be called from `conftest.py` via `pytest_addoption` wrapper that has to be defined there. It allows loading both `conftest.py` files at once without causing a failure due to adding the same `pytest` option.
(parser)
| 534 | |
| 535 | |
| 536 | def pytest_addoption_shared(parser): |
| 537 | """ |
| 538 | This function is to be called from `conftest.py` via `pytest_addoption` wrapper that has to be defined there. |
| 539 | |
| 540 | It allows loading both `conftest.py` files at once without causing a failure due to adding the same `pytest` |
| 541 | option. |
| 542 | |
| 543 | """ |
| 544 | option = "--make-reports" |
| 545 | if option not in pytest_opt_registered: |
| 546 | parser.addoption( |
| 547 | option, |
| 548 | action="store", |
| 549 | default=False, |
| 550 | help="generate report files. The value of this option is used as a prefix to report names", |
| 551 | ) |
| 552 | pytest_opt_registered[option] = 1 |
| 553 | |
| 554 | |
| 555 | def pytest_terminal_summary_main(tr, id): |
no outgoing calls
no test coverage detected