mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Standardize behavior: no docstrings in test functions. Also use
unittest.makeSuite() rather than loader.loadTestsFromTestCase().
This commit is contained in:
parent
327af775b8
commit
9eee554bd9
1 changed files with 4 additions and 6 deletions
|
@ -74,8 +74,7 @@ class ReferencesTestCase(TestBase):
|
||||||
"callback not called the right number of times")
|
"callback not called the right number of times")
|
||||||
|
|
||||||
def test_multiple_selfref_callbacks(self):
|
def test_multiple_selfref_callbacks(self):
|
||||||
"""Make sure all references are invalidated before callbacks
|
# Make sure all references are invalidated before callbacks are called
|
||||||
are called."""
|
|
||||||
#
|
#
|
||||||
# What's important here is that we're using the first
|
# What's important here is that we're using the first
|
||||||
# reference in the callback invoked on the second reference
|
# 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
|
self.assert_(1.0 + p == 3.0) # this used to SEGV
|
||||||
|
|
||||||
def test_callbacks_protected(self):
|
def test_callbacks_protected(self):
|
||||||
"""Callbacks protected from already-set exceptions?"""
|
# Callbacks protected from already-set exceptions?
|
||||||
# Regression test for SF bug #478534.
|
# Regression test for SF bug #478534.
|
||||||
class BogusError(Exception):
|
class BogusError(Exception):
|
||||||
pass
|
pass
|
||||||
|
@ -520,10 +519,9 @@ class MappingTestCase(TestBase):
|
||||||
|
|
||||||
|
|
||||||
def test_main():
|
def test_main():
|
||||||
loader = unittest.TestLoader()
|
|
||||||
suite = unittest.TestSuite()
|
suite = unittest.TestSuite()
|
||||||
suite.addTest(loader.loadTestsFromTestCase(ReferencesTestCase))
|
suite.addTest(unittest.makeSuite(ReferencesTestCase))
|
||||||
suite.addTest(loader.loadTestsFromTestCase(MappingTestCase))
|
suite.addTest(unittest.makeSuite(MappingTestCase))
|
||||||
test_support.run_suite(suite)
|
test_support.run_suite(suite)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue