1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
Description: Check contents of message, not entire string
The exception string changed in Python 3.5. Thus update not_found test to
check for critical elements within the exception string instead of the entire
string.
Author: Neil Williams <codehelp@debian.org>
Bug: https://bugs.launchpad.net/versiontools/+bug/1507523
Bug-Debian: https://bugs.debian.org/802155
--- a/versiontools/tests.py
+++ b/versiontools/tests.py
@@ -148,6 +148,4 @@
except Exception:
e = sys.exc_info()[1]
self.assertTrue(isinstance(e, DistutilsSetupError))
- self.assertEqual(str(e), "Unable to access '__nonexisting__' in "
- "'versiontools': 'module' object has "
- "no attribute '__nonexisting__'")
+ self.assertIn("Unable to access '__nonexisting__'", str(e))
|