Skip to content

Commit

Permalink
fix 2.6 test
Browse files Browse the repository at this point in the history
  • Loading branch information
rtaycher committed Aug 31, 2020
1 parent 4dbded1 commit 3f1ff7e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_past/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from contextlib import contextmanager

from future.tests.base import unittest
from future.utils import PY3
from future.utils import PY3, PY26

if PY3:
from past.builtins import cmp
Expand All @@ -29,6 +29,10 @@ def empty_context_manager(*args, **kwargs):
class TestCmp(unittest.TestCase):
def test_cmp(self):
for x, y, cmp_python2_value in test_values.cmp_python2_value:
if PY26:
# set comparison works a bit differently in 2.6
if isinstance(x, set) or isinstance(y, set):
continue
# to get this to run on python <3.4 which lacks subTest
with getattr(self, 'subTest', empty_context_manager)(x=x, y=y):
try:
Expand Down

0 comments on commit 3f1ff7e

Please sign in to comment.