summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib/test_main.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-07-08 08:22:33 (GMT)
committerGitHub <noreply@github.com>2023-07-08 08:22:33 (GMT)
commit6cd08a566f11ff6862ccf8637d01b179da46515a (patch)
tree2df3e0303226b4d6dad21a5f20217c61b08281ce /Lib/test/test_importlib/test_main.py
parent1931c2a438c50e6250725c84dff94fc760b9b951 (diff)
downloadcpython-6cd08a566f11ff6862ccf8637d01b179da46515a.zip
cpython-6cd08a566f11ff6862ccf8637d01b179da46515a.tar.gz
cpython-6cd08a566f11ff6862ccf8637d01b179da46515a.tar.bz2
[3.11] gh-106300: Improve `assertRaises(Exception)` usages in tests (GH-106302). (GH-106545)
(cherry picked from commit 6e6a4cd52332017b10c8d88fbbbfe015948093f4) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Diffstat (limited to 'Lib/test/test_importlib/test_main.py')
-rw-r--r--Lib/test/test_importlib/test_main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_importlib/test_main.py b/Lib/test/test_importlib/test_main.py
index d9d067c..7ef442f 100644
--- a/Lib/test/test_importlib/test_main.py
+++ b/Lib/test/test_importlib/test_main.py
@@ -56,7 +56,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)