:meta private:
(self, arg: str)
| 835 | self.consider_pluginarg(parg) |
| 836 | |
| 837 | def consider_pluginarg(self, arg: str) -> None: |
| 838 | """:meta private:""" |
| 839 | if arg.startswith("no:"): |
| 840 | name = arg[3:] |
| 841 | if name in essential_plugins: |
| 842 | raise UsageError(f"plugin {name} cannot be disabled") |
| 843 | |
| 844 | if name.endswith("conftest.py"): |
| 845 | raise UsageError( |
| 846 | f"Blocking conftest files using -p is not supported: -p no:{name}\n" |
| 847 | "conftest.py files are not plugins and cannot be disabled via -p.\n" |
| 848 | ) |
| 849 | |
| 850 | # PR #4304: remove stepwise if cacheprovider is blocked. |
| 851 | if name == "cacheprovider": |
| 852 | self.set_blocked("stepwise") |
| 853 | self.set_blocked("pytest_stepwise") |
| 854 | |
| 855 | self.set_blocked(name) |
| 856 | if not name.startswith("pytest_"): |
| 857 | self.set_blocked("pytest_" + name) |
| 858 | else: |
| 859 | name = arg |
| 860 | # Unblock the plugin. |
| 861 | self.unblock(name) |
| 862 | if not name.startswith("pytest_"): |
| 863 | self.unblock("pytest_" + name) |
| 864 | self.import_plugin(arg, consider_entry_points=True) |
| 865 | |
| 866 | def consider_conftest( |
| 867 | self, conftestmodule: types.ModuleType, registration_name: str |
no test coverage detected