Skip to content

Commit

Permalink
Test for whitespace split on buffer boundary.
Browse files Browse the repository at this point in the history
  • Loading branch information
isagalaev committed Oct 15, 2014
1 parent f94f9ab commit 6057279
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests.py
Original file line number Diff line number Diff line change
@@ -149,7 +149,12 @@ def test_lazy(self):
self.assertTrue(True)

def test_boundary_lexeme(self):
buf_size = JSON.decode('utf-8').index('false') + 1
buf_size = JSON.index(b'false') + 1
events = list(self.backend.basic_parse(BytesIO(JSON), buf_size=buf_size))
self.assertEqual(events, JSON_EVENTS)

def test_boundary_whitespace(self):
buf_size = JSON.index(b' ') + 1
events = list(self.backend.basic_parse(BytesIO(JSON), buf_size=buf_size))
self.assertEqual(events, JSON_EVENTS)

0 comments on commit 6057279

Please sign in to comment.