Skip to content

Commit

Permalink
Fix datetime mode test
Browse files Browse the repository at this point in the history
  • Loading branch information
kenrobbins committed Sep 15, 2015
1 parent c1a6730 commit cd95027
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,14 @@ def test_datetime_mode():
d = datetime.utcnow()
dstr = d.isoformat()

assert rapidjson.dumps(d) == '"%s"' % dstr
with pytest.raises(TypeError):
rapidjson.dumps(d)

with pytest.raises(TypeError):
rapidjson.dumps(d, datetime_mode=0)

assert rapidjson.dumps(d, datetime_mode=1) == '"%s"' % dstr


@pytest.mark.unit
def test_precise_float():
Expand Down

0 comments on commit cd95027

Please sign in to comment.