Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions checks/json/json1.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
assert data == {"name": "Ada", "language": "Python"}
assert name == "Ada"
assert data == {"name": "Ada", "language": "Python"}, (
f"data should contain Ada and Python, got {data!r}"
)
assert name == "Ada", f"name should be 'Ada', got {name!r}"
print("json1 ok")
4 changes: 3 additions & 1 deletion checks/json/json2.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
assert text == '{"a": 1, "b": 2}'
assert text == '{"a": 1, "b": 2}', (
"text should be '{\"a\": 1, \"b\": 2}'"
)
print("json2 ok")
2 changes: 1 addition & 1 deletion checks/json/json3.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
assert city == "London"
assert city == "London", f"city should be 'London', got {city!r}"
print("json3 ok")
4 changes: 3 additions & 1 deletion checks/json/json4.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
assert restored == {"ok": True, "count": 3}
assert restored == {"ok": True, "count": 3}, (
f"restored should contain ok=True and count=3, got {restored!r}"
)
print("json4 ok")
2 changes: 1 addition & 1 deletion checks/json/json5.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
assert timezone == "UTC"
assert timezone == "UTC", f"timezone should be 'UTC', got {timezone!r}"
print("json5 ok")
4 changes: 3 additions & 1 deletion checks/json/json6.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
assert active_names == ["Ada", "Guido"]
assert active_names == ["Ada", "Guido"], (
f"active_names should be ['Ada', 'Guido'], got {active_names!r}"
)
print("json6 ok")
Loading