Test order of plugin loading with `-p`.
(pytester: Pytester)
| 1703 | |
| 1704 | |
| 1705 | def test_plugin_loading_order(pytester: Pytester) -> None: |
| 1706 | class="st">""class="st">"Test order of plugin loading with `-p`."class="st">"" |
| 1707 | p1 = pytester.makepyfile( |
| 1708 | class="st">""" |
| 1709 | def test_terminal_plugin(request): |
| 1710 | import myplugin |
| 1711 | assert myplugin.terminal_plugin == [False, True] |
| 1712 | class="st">""", |
| 1713 | myplugin=class="st">""" |
| 1714 | terminal_plugin = [] |
| 1715 | |
| 1716 | def pytest_configure(config): |
| 1717 | terminal_plugin.append(bool(config.pluginmanager.get_plugin(class="st">"terminalreporter"))) |
| 1718 | |
| 1719 | def pytest_sessionstart(session): |
| 1720 | config = session.config |
| 1721 | terminal_plugin.append(bool(config.pluginmanager.get_plugin(class="st">"terminalreporter"))) |
| 1722 | class="st">""", |
| 1723 | ) |
| 1724 | pytester.syspathinsert() |
| 1725 | result = pytester.runpytest(class="st">"-p", class="st">"myplugin", str(p1)) |
| 1726 | assert result.ret == 0 |
| 1727 | |
| 1728 | |
| 1729 | def test_invalid_options_show_extra_information(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected