summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_weakref.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-08-22 20:21:30 (GMT)
committerGuido van Rossum <guido@python.org>2002-08-22 20:21:30 (GMT)
commit9eee554bd9cff22eea0e39dd107576f0ef93e108 (patch)
tree343a15a93312a12a61c7bc522ac36b99a78a67a5 /Lib/test/test_weakref.py
parent327af775b89e7870807d1beae66567e77dd64ee5 (diff)
downloadcpython-9eee554bd9cff22eea0e39dd107576f0ef93e108.zip
cpython-9eee554bd9cff22eea0e39dd107576f0ef93e108.tar.gz
cpython-9eee554bd9cff22eea0e39dd107576f0ef93e108.tar.bz2
Standardize behavior: no docstrings in test functions. Also use
unittest.makeSuite() rather than loader.loadTestsFromTestCase().
Diffstat (limited to 'Lib/test/test_weakref.py')
-rw-r--r--Lib/test/test_weakref.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py
index d6a33d2..3a548cd 100644
--- a/Lib/test/test_weakref.py
+++ b/Lib/test/test_weakref.py
@@ -74,8 +74,7 @@ class ReferencesTestCase(TestBase):
"callback not called the right number of times")
def test_multiple_selfref_callbacks(self):
- """Make sure all references are invalidated before callbacks
- are called."""
+ # Make sure all references are invalidated before callbacks are called
#
# What's important here is that we're using the first
# reference in the callback invoked on the second reference
@@ -262,7 +261,7 @@ class ReferencesTestCase(TestBase):
self.assert_(1.0 + p == 3.0) # this used to SEGV
def test_callbacks_protected(self):
- """Callbacks protected from already-set exceptions?"""
+ # Callbacks protected from already-set exceptions?
# Regression test for SF bug #478534.
class BogusError(Exception):
pass
@@ -520,10 +519,9 @@ class MappingTestCase(TestBase):
def test_main():
- loader = unittest.TestLoader()
suite = unittest.TestSuite()
- suite.addTest(loader.loadTestsFromTestCase(ReferencesTestCase))
- suite.addTest(loader.loadTestsFromTestCase(MappingTestCase))
+ suite.addTest(unittest.makeSuite(ReferencesTestCase))
+ suite.addTest(unittest.makeSuite(MappingTestCase))
test_support.run_suite(suite)