diff options
| -rw-r--r-- | pkg_resources/tests/test_resources.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 9c1eaeec..a55478a2 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -298,9 +298,8 @@ class TestEntryPoints: reject_specs = "foo", "x=a:b:c", "q=x/na", "fez=pish:tush-z", "x=f[a]>2" @pytest.mark.parametrize("reject_spec", reject_specs) def test_reject_spec(self, reject_spec): - try: EntryPoint.parse(reject_spec) - except ValueError: pass - else: raise AssertionError("Should've been bad", reject_spec) + with pytest.raises(ValueError): + EntryPoint.parse(reject_spec) def test_printable_name(self): """ |
