Beispiel #1
0
 def test_consider_module(self, testdir,
                          pytestpm: PytestPluginManager) -> None:
     testdir.syspathinsert()
     testdir.makepyfile(pytest_p1="#")
     testdir.makepyfile(pytest_p2="#")
     mod = types.ModuleType("temp")
     mod.__dict__["pytest_plugins"] = ["pytest_p1", "pytest_p2"]
     pytestpm.consider_module(mod)
     assert pytestpm.get_plugin("pytest_p1").__name__ == "pytest_p1"
     assert pytestpm.get_plugin("pytest_p2").__name__ == "pytest_p2"