mirror of
https://github.com/python/cpython.git
synced 2025-11-20 19:06:50 +00:00
Make some tests more verbose in the face of failure
This commit is contained in:
parent
baacf4d293
commit
a24348cec1
1 changed files with 6 additions and 2 deletions
|
|
@ -191,8 +191,12 @@ a = A(destroyed)"""
|
||||||
|
|
||||||
def test_module_repr_source(self):
|
def test_module_repr_source(self):
|
||||||
r = repr(unittest)
|
r = repr(unittest)
|
||||||
self.assertEqual(r[:25], "<module 'unittest' from '")
|
starts_with = "<module 'unittest' from '"
|
||||||
self.assertEqual(r[-13:], "__init__.py'>")
|
ends_with = "__init__.py'>"
|
||||||
|
self.assertEqual(r[:len(starts_with)], starts_with,
|
||||||
|
'{!r} does not start with {!r}'.format(r, starts_with))
|
||||||
|
self.assertEqual(r[-len(ends_with):], ends_with,
|
||||||
|
'{!r} does not end with {!r}'.format(r, ends_with))
|
||||||
|
|
||||||
def test_module_finalization_at_shutdown(self):
|
def test_module_finalization_at_shutdown(self):
|
||||||
# Module globals and builtins should still be available during shutdown
|
# Module globals and builtins should still be available during shutdown
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue