Skip to content

Commit c051026

Browse files
committed
fix other python2 test issues
1 parent f006cad commit c051026

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_past/test_misc.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
from contextlib import contextmanager
1212

1313
from future.tests.base import unittest
14-
from past.builtins import cmp
14+
from future.utils import PY3
15+
16+
if PY3:
17+
from past.builtins import cmp
1518

1619
_dir = os.path.dirname(os.path.abspath(__file__))
1720
sys.path.append(_dir)
@@ -20,7 +23,7 @@
2023

2124
@contextmanager
2225
def empty_context_manager(*args, **kwargs):
23-
return dict(args=args, kwargs=kwargs)
26+
yield dict(args=args, kwargs=kwargs)
2427

2528

2629
class TestCmp(unittest.TestCase):

0 commit comments

Comments
 (0)