diff options
| author | Tim Graham <timograham@gmail.com> | 2017-01-19 21:10:33 -0500 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2017-01-20 08:49:47 +0100 |
| commit | 109b33f64c8d3f48c9e0bd3ea8d42fe6f3cb02b7 (patch) | |
| tree | ce4c2311d5993e2e6b70062530834269314c0eb1 /tests/utils_tests | |
| parent | dc8834cad41aa407f402dc54788df3cd37ab3e22 (diff) | |
Refs #23919 -- Simplified assertRaisesRegex()'s that accounted for Python 2.
Diffstat (limited to 'tests/utils_tests')
| -rw-r--r-- | tests/utils_tests/test_module_loading.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/utils_tests/test_module_loading.py b/tests/utils_tests/test_module_loading.py index e979b3e7ba..8e6806e8d5 100644 --- a/tests/utils_tests/test_module_loading.py +++ b/tests/utils_tests/test_module_loading.py @@ -146,11 +146,11 @@ class AutodiscoverModulesTestCase(SimpleTestCase): autodiscover_modules('missing_module') def test_autodiscover_modules_found_but_bad_module(self): - with self.assertRaisesRegex(ImportError, "No module named '?a_package_name_that_does_not_exist'?"): + with self.assertRaisesMessage(ImportError, "No module named 'a_package_name_that_does_not_exist'"): autodiscover_modules('bad_module') def test_autodiscover_modules_several_one_bad_module(self): - with self.assertRaisesRegex(ImportError, "No module named '?a_package_name_that_does_not_exist'?"): + with self.assertRaisesMessage(ImportError, "No module named 'a_package_name_that_does_not_exist'"): autodiscover_modules('good_module', 'bad_module') def test_autodiscover_modules_several_found(self): |
