Skip to content

Commit

Permalink
Add roundtrip tests for NaN, Infinity, and lists of those
Browse files Browse the repository at this point in the history
  • Loading branch information
catherio committed Jan 16, 2025
1 parent dfa372b commit de986af
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions data/roundtrip/roundtrip28.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[NaN]
1 change: 1 addition & 0 deletions data/roundtrip/roundtrip29.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[Infinity]
1 change: 1 addition & 0 deletions data/roundtrip/roundtrip30.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[NaN,Infinity,-Infinity]
18 changes: 18 additions & 0 deletions test/test_roundtrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,21 @@ def test_roundtrip027(self):
roundtrip027.json
"""
self._run_roundtrip_json("roundtrip27.json")

def test_roundtrip028(self):
"""
roundtrip028.json
"""
self._run_roundtrip_json("roundtrip28.json")

def test_roundtrip029(self):
"""
roundtrip029.json
"""
self._run_roundtrip_json("roundtrip29.json")

def test_roundtrip030(self):
"""
roundtrip030.json
"""
self._run_roundtrip_json("roundtrip30.json")

0 comments on commit de986af

Please sign in to comment.