diff --git a/tests/test_conversion.py b/tests/test_conversion.py index 4f179dc5..02747f52 100644 --- a/tests/test_conversion.py +++ b/tests/test_conversion.py @@ -140,12 +140,16 @@ def test_conversion_entry_point_string(npe1_repo, mock_npe1_pm_with_plugin): def test_conversion_missing(): - with pytest.raises(ModuleNotFoundError), pytest.warns(UserWarning): + with pytest.raises( + PackageNotFoundError, match="No package or entry point found with name", + ): manifest_from_npe1("does-not-exist-asdf6as987") def test_conversion_package_is_not_a_plugin(): - with pytest.raises(PackageNotFoundError): + with pytest.raises( + PackageNotFoundError, match="No package or entry point found with name", + ): manifest_from_npe1("pytest")