mirror of
https://github.com/python/cpython.git
synced 2025-08-12 04:49:01 +00:00
gh-106300: Improve assertRaises(Exception)
usages in tests (GH-106302)
This commit is contained in:
parent
80b9b3a517
commit
6e6a4cd523
7 changed files with 20 additions and 12 deletions
|
@ -68,7 +68,7 @@ class BasicTests(fixtures.DistInfoPkg, unittest.TestCase):
|
|||
dict(name=''),
|
||||
)
|
||||
def test_invalid_inputs_to_from_name(self, name):
|
||||
with self.assertRaises(Exception):
|
||||
with self.assertRaises(ValueError):
|
||||
Distribution.from_name(name)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue