Skip to content

Commit

Permalink
More descriptive variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
JustAnotherArchivist committed Jun 17, 2022
1 parent 773c04a commit 99709df
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_ujson.py
Expand Up @@ -613,17 +613,17 @@ def test_decode_numeric_int_exp(test_input):
@pytest.mark.parametrize("mode", ["encode", "decode"])
def test_encode_decode_big_int(i, mode):
# Test ints that are too large to be represented by a C integer type
for py in (i, [i], {"i": i}):
j = json.dumps(py, separators=(",", ":"))
for python_object in (i, [i], {"i": i}):
json_string = json.dumps(python_object, separators=(",", ":"))
if mode == "encode":
if hasattr(sys, "pypy_version_info"):
# https://foss.heptapod.net/pypy/pypy/-/issues/3765
pytest.skip("PyPy can't serialise big ints")
assert ujson.encode(py) == j
if isinstance(py, dict):
assert ujson.encode(py, sort_keys=True) == j
assert ujson.encode(python_object) == json_string
if isinstance(python_object, dict):
assert ujson.encode(python_object, sort_keys=True) == json_string
else:
assert ujson.decode(j) == py
assert ujson.decode(json_string) == python_object


@pytest.mark.parametrize(
Expand Down

0 comments on commit 99709df

Please sign in to comment.