diff options
| author | Éric Araujo <merwok@netwok.org> | 2011-06-17 13:47:41 (GMT) |
|---|---|---|
| committer | Éric Araujo <merwok@netwok.org> | 2011-06-17 13:47:41 (GMT) |
| commit | ed5d2f131083f16ab3d305ccc6f58c66f70f1f75 (patch) | |
| tree | 9f4de37461401f9f541df24d7c04effe81f7f2a4 /Lib/packaging/tests/test_util.py | |
| parent | c06f46f74c4a5f3cc46aa3a6d1c9cc1cb187e4c4 (diff) | |
| download | cpython-ed5d2f131083f16ab3d305ccc6f58c66f70f1f75.zip cpython-ed5d2f131083f16ab3d305ccc6f58c66f70f1f75.tar.gz cpython-ed5d2f131083f16ab3d305ccc6f58c66f70f1f75.tar.bz2 | |
Minor tweaks to packaging tests.
- Move a tearDown method right after setUp
- Use assertRaises instead of reinventing it
- Skip a test instead of commenting it out, as a reminder
Diffstat (limited to 'Lib/packaging/tests/test_util.py')
| -rw-r--r-- | Lib/packaging/tests/test_util.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Lib/packaging/tests/test_util.py b/Lib/packaging/tests/test_util.py index 9b6498b..e3ccfd5 100644 --- a/Lib/packaging/tests/test_util.py +++ b/Lib/packaging/tests/test_util.py @@ -700,14 +700,8 @@ class GlobTestCase(GlobTestCaseBase): '{a**a,babar}', '{bob,b**z}', ] - msg = "%r is not supposed to be a valid pattern" for pattern in invalids: - try: - iglob(pattern) - except ValueError: - continue - else: - self.fail(msg % pattern) + self.assertRaises(ValueError, iglob, pattern) class EggInfoToDistInfoTestCase(support.TempdirManager, |
