From 088441e9e368685f2400f808802f0457ce34947f Mon Sep 17 00:00:00 2001 From: Lucy Liu Date: Fri, 8 Mar 2024 14:36:34 +1100 Subject: [PATCH] fix test --- tests/test_conversion.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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")