Skip to content

Commit

Permalink
[1.7.x] Fixed flake8 warnings introduced in recent commits.
Browse files Browse the repository at this point in the history
Backport of 79f0561 from master
  • Loading branch information
charettes authored and timgraham committed Apr 20, 2014
1 parent 9e86c3f commit 33d1dc2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions django/db/backends/postgresql_psycopg2/base.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
Requires psycopg 2: http://initd.org/projects/psycopg2 Requires psycopg 2: http://initd.org/projects/psycopg2
""" """


import sys

from django.conf import settings from django.conf import settings
from django.db.backends import (BaseDatabaseFeatures, BaseDatabaseWrapper, from django.db.backends import (BaseDatabaseFeatures, BaseDatabaseWrapper,
BaseDatabaseValidation) BaseDatabaseValidation)
Expand Down
2 changes: 1 addition & 1 deletion tests/prefetch_related/tests.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ def setUp(self):
for _ in range(3): for _ in range(3):
house = House.objects.create() house = House.objects.create()
for _ in range(3): for _ in range(3):
self.rooms.append(Room.objects.create(house = house)) self.rooms.append(Room.objects.create(house=house))


#@override_settings(DEBUG=True) #@override_settings(DEBUG=True)
def test_bug(self): def test_bug(self):
Expand Down
3 changes: 2 additions & 1 deletion tests/test_discovery_sample/doctests.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
https://docs.python.org/3/library/doctest.html https://docs.python.org/3/library/doctest.html
""" """



def factorial(n): def factorial(n):
"""Return the factorial of n, an exact integer >= 0. """Return the factorial of n, an exact integer >= 0.
Expand Down Expand Up @@ -35,7 +36,7 @@ def factorial(n):
raise ValueError("n must be >= 0") raise ValueError("n must be >= 0")
if math.floor(n) != n: if math.floor(n) != n:
raise ValueError("n must be exact integer") raise ValueError("n must be exact integer")
if n+1 == n: # catch a value like 1e300 if n + 1 == n: # catch a value like 1e300
raise OverflowError("n too large") raise OverflowError("n too large")
result = 1 result = 1
factor = 2 factor = 2
Expand Down
1 change: 0 additions & 1 deletion tests/test_runner/test_discover_runner.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ def test_ignore_adjacent(self):


def test_testcase_ordering(self): def test_testcase_ordering(self):
suite = DiscoverRunner().build_suite(["test_discovery_sample/"]) suite = DiscoverRunner().build_suite(["test_discovery_sample/"])
tc_names = [case.__class__.__name__ for case in suite._tests]
self.assertEqual( self.assertEqual(
suite._tests[0].__class__.__name__, suite._tests[0].__class__.__name__,
'TestDjangoTestCase', 'TestDjangoTestCase',
Expand Down

0 comments on commit 33d1dc2

Please sign in to comment.