summaryrefslogtreecommitdiff
path: root/Lib/unittest.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-03-23 22:29:45 +0000
committerBenjamin Peterson <benjamin@python.org>2009-03-23 22:29:45 +0000
commitcb2b0e45d4384a45e0852e8e7eba958a70949abb (patch)
tree7825fd2ff823b14b46ee04a3c4eb4eabc0c530a5 /Lib/unittest.py
parent692428e77f467a2f2d4cebfff59fb0b5f9099547 (diff)
downloadcpython-git-cb2b0e45d4384a45e0852e8e7eba958a70949abb.tar.gz
comply with the evilJavaNamingScheme for attribute names
It seems my love of PEP 8 overrode the need for consistentcy
Diffstat (limited to 'Lib/unittest.py')
-rw-r--r--Lib/unittest.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/unittest.py b/Lib/unittest.py
index 8263887a6a..74585eee00 100644
--- a/Lib/unittest.py
+++ b/Lib/unittest.py
@@ -176,8 +176,8 @@ class TestResult(object):
self.errors = []
self.testsRun = 0
self.skipped = []
- self.expected_failures = []
- self.unexpected_successes = []
+ self.expectedFailures = []
+ self.unexpectedSuccesses = []
self.shouldStop = False
def startTest(self, test):
@@ -209,12 +209,12 @@ class TestResult(object):
def addExpectedFailure(self, test, err):
"""Called when an expected failure/error occured."""
- self.expected_failures.append(
+ self.expectedFailures.append(
(test, self._exc_info_to_string(err, test)))
def addUnexpectedSuccess(self, test):
"""Called when a test was expected to fail, but succeed."""
- self.unexpected_successes.append(test)
+ self.unexpectedSuccesses.append(test)
def wasSuccessful(self):
"Tells whether or not this result was a success"
@@ -923,10 +923,10 @@ class TextTestRunner(object):
self.stream.writeln("Ran %d test%s in %.3fs" %
(run, run != 1 and "s" or "", timeTaken))
self.stream.writeln()
- results = map(len, (result.expected_failures,
- result.unexpected_successes,
+ results = map(len, (result.expectedFailures,
+ result.unexpectedSuccesses,
result.skipped))
- expected_fails, unexpected_successes, skipped = results
+ expectedFails, unexpectedSuccesses, skipped = results
infos = []
if not result.wasSuccessful():
self.stream.write("FAILED")