Skip to content

Commit

Permalink
add test for desired feature
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycrosley committed Dec 1, 2015
1 parent e7b71b8 commit 0bd20dd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_output_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ class NamedTupleObject(namedtuple('BaseTuple', ('name', 'value'))):
data = set((1, 2, 3, 3))
assert hug.input_format.json(BytesIO(hug.output_format.json(data))) == [1, 2, 3]

data = (number for number in range(1, 4))
assert hug.input_format.json(BytesIO(hug.output_format.json(data))) == [1, 2, 3]

with open('README.md', 'rb') as json_file:
assert hasattr(hug.output_format.json(json_file), 'read')

Expand Down

0 comments on commit 0bd20dd

Please sign in to comment.