summaryrefslogtreecommitdiff
path: root/django/test
diff options
context:
space:
mode:
authorcoagulant <baryshev@gmail.com>2013-11-03 01:02:56 +0400
committerTim Graham <timograham@gmail.com>2013-11-02 18:20:39 -0400
commit3bc0d46a840f17dce561daca8a6b8690b2cf5d0a (patch)
treec25954abbde0c4c06af7f862effcd351047cddf9 /django/test
parent2a03a9a9a1c4517be75e72899e545b0bc9dd0688 (diff)
Fixed all E261 warnings
Diffstat (limited to 'django/test')
-rw-r--r--django/test/_doctest.py16
-rw-r--r--django/test/simple.py4
2 files changed, 10 insertions, 10 deletions
diff --git a/django/test/_doctest.py b/django/test/_doctest.py
index 2b90f1dc2e..048d886720 100644
--- a/django/test/_doctest.py
+++ b/django/test/_doctest.py
@@ -898,7 +898,7 @@ class DocTestFinder:
elif hasattr(object, '__module__'):
return module.__name__ == object.__module__
elif isinstance(object, property):
- return True # [XX] no way not be sure.
+ return True # [XX] no way not be sure.
else:
raise ValueError("object must be a class or function")
@@ -1221,7 +1221,7 @@ class DocTestRunner:
# to modify them).
original_optionflags = self.optionflags
- SUCCESS, FAILURE, BOOM = range(3) # `outcome` state
+ SUCCESS, FAILURE, BOOM = range(3) # `outcome` state
check = self._checker.check_output
@@ -1274,7 +1274,7 @@ class DocTestRunner:
# Strip b"" and u"" prefixes from the repr and expected output
# TODO: better way of stripping the prefixes?
expected = example.want
- expected = expected.strip() # be wary of newlines
+ expected = expected.strip() # be wary of newlines
s = s.replace("u", "")
s = s.replace("b", "")
expected = expected.replace("u", "")
@@ -1288,7 +1288,7 @@ class DocTestRunner:
lines.append(s)
# let them match
- if s == expected: # be wary of false positives here
+ if s == expected: # be wary of false positives here
# they should be the same, print expected value
sys.stdout.write("%s\n" % example.want.strip())
@@ -1314,13 +1314,13 @@ class DocTestRunner:
# Don't blink! This is where the user's code gets run.
six.exec_(compile(example.source, filename, "single",
compileflags, 1), test.globs)
- self.debugger.set_continue() # ==== Example Finished ====
+ self.debugger.set_continue() # ==== Example Finished ====
exception = None
except KeyboardInterrupt:
raise
except:
exception = sys.exc_info()
- self.debugger.set_continue() # ==== Example Finished ====
+ self.debugger.set_continue() # ==== Example Finished ====
finally:
# restore the original displayhook
sys.displayhook = original_displayhook
@@ -1647,11 +1647,11 @@ class OutputChecker:
# Use difflib to find their differences.
if optionflags & REPORT_UDIFF:
diff = difflib.unified_diff(want_lines, got_lines, n=2)
- diff = list(diff)[2:] # strip the diff header
+ diff = list(diff)[2:] # strip the diff header
kind = 'unified diff with -expected +actual'
elif optionflags & REPORT_CDIFF:
diff = difflib.context_diff(want_lines, got_lines, n=2)
- diff = list(diff)[2:] # strip the diff header
+ diff = list(diff)[2:] # strip the diff header
kind = 'context diff with expected followed by actual'
elif optionflags & REPORT_NDIFF:
engine = difflib.Differ(charjunk=difflib.IS_CHARACTER_JUNK)
diff --git a/django/test/simple.py b/django/test/simple.py
index b2ab1269b5..05a7329fae 100644
--- a/django/test/simple.py
+++ b/django/test/simple.py
@@ -191,7 +191,7 @@ def build_test(label):
try:
if issubclass(TestClass, (unittest.TestCase, real_unittest.TestCase)):
- if len(parts) == 2: # label is app.TestClass
+ if len(parts) == 2: # label is app.TestClass
try:
return unittest.TestLoader().loadTestsFromTestCase(
TestClass)
@@ -199,7 +199,7 @@ def build_test(label):
raise ValueError(
"Test label '%s' does not refer to a test class"
% label)
- else: # label is app.TestClass.test_method
+ else: # label is app.TestClass.test_method
return TestClass(parts[2])
except TypeError:
# TestClass isn't a TestClass - it must be a method or normal class