(monkeypatch)
| 875 | |
| 876 | |
| 877 | def test_importorskip_dev_module(monkeypatch) -> None: |
| 878 | try: |
| 879 | mod = types.ModuleType(class="st">"mockmodule") |
| 880 | mod.__version__ = class="st">"0.13.0.dev-43290" class="cm"># type: ignore |
| 881 | monkeypatch.setitem(sys.modules, class="st">"mockmodule", mod) |
| 882 | mod2 = pytest.importorskip(class="st">"mockmodule", minversion=class="st">"0.12.0") |
| 883 | assert mod2 == mod |
| 884 | with pytest.raises(pytest.skip.Exception): |
| 885 | pytest.importorskip(class="st">"mockmodule1", minversion=class="st">"0.14.0") |
| 886 | except pytest.skip.Exception: class="cm"># pragma: no cover |
| 887 | assert False, fclass="st">"spurious skip: {ExceptionInfo.from_current()}" |
| 888 | |
| 889 | |
| 890 | def test_importorskip_module_level(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected