mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #21298 -- Fixed E301 pep8 warnings
This commit is contained in:
parent
317040a73b
commit
c3aa2948c6
83 changed files with 180 additions and 2 deletions
|
@ -355,6 +355,7 @@ class FileStorageTests(unittest.TestCase):
|
|||
Test behaviour when file.chunks() is raising an error
|
||||
"""
|
||||
f1 = ContentFile('chunks fails')
|
||||
|
||||
def failing_chunks():
|
||||
raise IOError
|
||||
f1.chunks = failing_chunks
|
||||
|
@ -532,10 +533,13 @@ class DimensionClosingBug(unittest.TestCase):
|
|||
|
||||
class FileWrapper(object):
|
||||
_closed = []
|
||||
|
||||
def __init__(self, f):
|
||||
self.f = f
|
||||
|
||||
def __getattr__(self, name):
|
||||
return getattr(self.f, name)
|
||||
|
||||
def close(self):
|
||||
self._closed.append(True)
|
||||
self.f.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue