Skip to content

Commit 4fb963b

Browse files
TST: Fixed version comparison (pandas-dev#20469)
* TST: Fixed version comparison This failed to skip for 3.5.x because the micro component made it False. * Use pandas.compat * More pandas compat
1 parent 0699659 commit 4fb963b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pandas/tests/extension/json/test_json.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import operator
2-
import sys
32

43
import pytest
54

65

6+
from pandas.compat import PY2, PY36
77
from pandas.tests.extension import base
88

99
from .array import JSONArray, JSONDtype, make_data
1010

11-
pytestmark = pytest.mark.skipif(sys.version_info[0] == 2,
12-
reason="Py2 doesn't have a UserDict")
11+
pytestmark = pytest.mark.skipif(PY2, reason="Py2 doesn't have a UserDict")
1312

1413

1514
@pytest.fixture
@@ -81,7 +80,7 @@ def test_fillna_frame(self):
8180

8281
class TestMethods(base.BaseMethodsTests):
8382
unhashable = pytest.mark.skip(reason="Unhashable")
84-
unstable = pytest.mark.skipif(sys.version_info <= (3, 5),
83+
unstable = pytest.mark.skipif(not PY36, # 3.6 or higher
8584
reason="Dictionary order unstable")
8685

8786
@unhashable

0 commit comments

Comments
 (0)