MCPcopy Create free account
hub / github.com/TencentARC/BrushNet / pytest_addoption_shared

Function pytest_addoption_shared

src/diffusers/utils/testing_utils.py:536–552  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

534
535
536def 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
555def pytest_terminal_summary_main(tr, id):

Callers 2

pytest_addoptionFunction · 0.90
pytest_addoptionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected