Skip to content

Commit

Permalink
Fixed flake8 problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Jul 20, 2017
1 parent b3cec2f commit ea72149
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_codecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def write(self, chars):
self._buffer += chars

def read(self, size=-1):
if size<0:
if size < 0:
s = self._buffer
self._buffer = self._buffer[:0] # make empty
self._buffer = self._buffer[:0] # make empty
return s
else:
s = self._buffer[:size]
Expand Down Expand Up @@ -70,7 +70,6 @@ def check_state_handling_encode(self, encoding, u, s):
part2 = d.encode(u[i:], True)
self.assertEqual(s, part1+part2)


class ReadTest(MixInCheckStateHandling):
def check_partial(self, input, partialresults):
# get a StreamReader for the encoding and feed the bytestring version
Expand Down Expand Up @@ -180,6 +179,7 @@ def test_mixed_readline_and_read(self):
"All the king's horses and all the king's men\r",
"Couldn't put Humpty together again."]
data = ''.join(lines)

def getreader():
stream = io.BytesIO(data.encode(self.encoding))
return codecs.getreader(self.encoding)(stream)
Expand Down

0 comments on commit ea72149

Please sign in to comment.