Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 src/future/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@


PY3 = sys.version_info[0] == 3
PY35 = sys.version_info[0:2] >= (3, 5)
PY35_PLUS = sys.version_info[0:2] >= (3, 5)
PY36_PLUS = sys.version_info[0:2] >= (3, 6)
PY2 = sys.version_info[0] == 2
PY26 = sys.version_info[0:2] == (2, 6)
PY27 = sys.version_info[0:2] == (2, 7)
Expand Down
10 changes: 5 additions & 5 deletions tests/test_future/test_bytes.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ class MyDict(UserDict.UserDict):

self.assertEqual(bytes(b'%(foo)s') % d, b'bar')

@unittest.skipUnless(utils.PY35 or utils.PY2,
@unittest.skipUnless(utils.PY35_PLUS or utils.PY2,
'test requires Python 2 or 3.5+')
def test_mod_more(self):
self.assertEqual(b'%s' % b'aaa', b'aaa')
Expand All @@ -577,10 +577,10 @@ def test_mod_more(self):
self.assertEqual(bytes(b'%s') % (b'aaa',), b'aaa')
self.assertEqual(bytes(b'%s') % (bytes(b'aaa'),), b'aaa')

self.assertEqual(bytes(b'%(x)s') % {'x': b'aaa'}, b'aaa')
self.assertEqual(bytes(b'%(x)s') % {'x': bytes(b'aaa')}, b'aaa')
self.assertEqual(bytes(b'%(x)s') % {b'x': b'aaa'}, b'aaa')
self.assertEqual(bytes(b'%(x)s') % {b'x': bytes(b'aaa')}, b'aaa')

@unittest.skipUnless(utils.PY35 or utils.PY2,
@unittest.skipUnless(utils.PY35_PLUS or utils.PY2,
'test requires Python 2 or 3.5+')
def test_mod(self):
"""
Expand All @@ -606,7 +606,7 @@ def test_mod(self):
a = b % (bytes(b'seventy-nine'), 79)
self.assertEqual(a, b'seventy-nine / 100 = 79%')

@unittest.skipUnless(utils.PY35 or utils.PY2,
@unittest.skipUnless(utils.PY35_PLUS or utils.PY2,
'test requires Python 2 or 3.5+')
def test_imod(self):
"""
Expand Down
3 changes: 2 additions & 1 deletion tests/test_future/test_urllibnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ def test_getcode(self):

# On Windows, socket handles are not file descriptors; this
# test can't pass on Windows.
@unittest.skipIf(sys.platform in ('win32',), 'not appropriate for Windows')
@unittest.skipIf(sys.platform in ('darwin', 'win32',), 'not appropriate for Windows')
@unittest.skipIf(utils.PY36_PLUS, 'test not applicable on Python 3.5 and higher')
@skip26
def test_fileno(self):
# Make sure fd returned by fileno is valid.
Expand Down