Skip to content

Commit 22072f9

Browse files
committed
ignore for pypy3
1 parent abdb0df commit 22072f9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

deepdiff/diff_doc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ ignore_string_case
488488

489489

490490
ignore_nan_inequality
491-
Whether to ignore float('nan') inequality in Python.
491+
Whether to ignore float('nan') inequality in Python. Note that this is a cPython "feature". Some versions of Pypy3 for example have nan==nan.
492492

493493
>>> float('nan') == float('nan')
494494
False

tests/test_diff_text.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from decimal import Decimal
88
from deepdiff import DeepDiff
99
from deepdiff.helper import number_to_string
10+
from deepdiff.helper import pypy3
1011
from tests import CustomClass
1112

1213
logging.disable(logging.CRITICAL)
@@ -1729,5 +1730,6 @@ def test_bool_vs_number(self):
17291730
(float('nan'), float('nan'), {'ignore_nan_inequality': True}, []),
17301731
([1, float('nan')], [1, float('nan')], {'ignore_nan_inequality': True}, []),
17311732
])
1733+
@pytest.mark.skipif(pypy3, reason="some versions of pypy3 have nan==nan")
17321734
def test_ignore_nan_inequality(self, t1, t2, params, expected_result):
17331735
assert expected_result == list(DeepDiff(t1, t2, **params).keys())

0 commit comments

Comments
 (0)