mirror of
https://github.com/python/cpython.git
synced 2025-11-28 22:18:54 +00:00
Change order of arguments in a unittest function.
This commit is contained in:
parent
73dbe04619
commit
8cb253f8d6
1 changed files with 4 additions and 4 deletions
|
|
@ -33,13 +33,13 @@ def _make_failed_import_test(name, suiteClass):
|
||||||
# Python 2.3 compatibility
|
# Python 2.3 compatibility
|
||||||
# format_exc returns two frames of discover.py as well
|
# format_exc returns two frames of discover.py as well
|
||||||
message += '\n%s' % traceback.format_exc()
|
message += '\n%s' % traceback.format_exc()
|
||||||
return _make_failed_test('ModuleImportFailure', name, suiteClass,
|
return _make_failed_test('ModuleImportFailure', name, ImportError(message),
|
||||||
ImportError(message))
|
suiteClass)
|
||||||
|
|
||||||
def _make_failed_load_tests(name, exception, suiteClass):
|
def _make_failed_load_tests(name, exception, suiteClass):
|
||||||
return _make_failed_test('LoadTestsFailure', name, suiteClass, exception)
|
return _make_failed_test('LoadTestsFailure', name, exception, suiteClass)
|
||||||
|
|
||||||
def _make_failed_test(classname, methodname, suiteClass, exception):
|
def _make_failed_test(classname, methodname, exception, suiteClass):
|
||||||
def testFailure(self):
|
def testFailure(self):
|
||||||
raise exception
|
raise exception
|
||||||
attrs = {methodname: testFailure}
|
attrs = {methodname: testFailure}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue