Skip to content

TST: Fixed version comparison #20469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 24, 2018
Merged
Changes from 2 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
3 changes: 2 additions & 1 deletion pandas/tests/extension/json/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pytest


from pandas.compat import PY36
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can also import PY2 here and replace sys.version_info[0] == 2 on line 12 with it, as that is the exact definition of PY2. That's the only remaining reference to sys, so you could then remove the import sys too.

from pandas.tests.extension import base

from .array import JSONArray, JSONDtype, make_data
Expand Down Expand Up @@ -81,7 +82,7 @@ def test_fillna_frame(self):

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

@unhashable
Expand Down