Skip to content

Commit d122838

Browse files
committed
json: Add simple test.
1 parent 904cfd2 commit d122838

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

json/test_json.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import json
2+
3+
inp = ['foo', {'bar': ('baz', None, 1, 2)}]
4+
print(inp)
5+
6+
s = json.dumps(inp)
7+
print(s)
8+
9+
outp = json.loads(s)
10+
print(outp)
11+
12+
# Doesn't work because JSON doesn't have tuples
13+
#assert inp == outp

0 commit comments

Comments
 (0)