Skip to content

Commit e1fc464

Browse files
committed
fixing the test that fails on python 3.7
1 parent 89ab170 commit e1fc464

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_serialization.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from decimal import Decimal
1010
from collections import Counter
1111
from deepdiff import DeepDiff
12-
from deepdiff.helper import pypy3
12+
from deepdiff.helper import pypy3, py_current_version
1313
from deepdiff.serialization import (
1414
pickle_load, pickle_dump, ForbiddenModule, ModuleNotFoundError,
1515
MODULE_NOT_FOUND_MSG, FORBIDDEN_MODULE_MSG, pretty_print_diff,
@@ -341,6 +341,9 @@ def test_pretty_form_method(self, expected, verbose_level):
341341
(8, field_stats1, lambda x: SomeStats(**x)),
342342
])
343343
def test_json_dumps_and_loads(self, test_num, value, func_to_convert_back):
344+
if test_num == 8 and py_current_version < 3.8:
345+
print(f"Skipping test_json_dumps_and_loads #{test_num} on Python {py_current_version}")
346+
return
344347
serialized = json_dumps(value)
345348
back = json_loads(serialized)
346349
if func_to_convert_back:

0 commit comments

Comments
 (0)