mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 01:04:29 +03:00
Implement @hugovk's comments
The `py36` flag now uses a tuple comparison to correctly handle future major version. The unit test file also now uses `py36` as exported by the _util module, rather than re-testing `sys.version_info`.
This commit is contained in:
parent
adae7ecc6a
commit
07bff3e9b8
|
@ -4,8 +4,6 @@ from helper import unittest, PillowTestCase
|
|||
|
||||
from PIL import _util
|
||||
|
||||
py36 = sys.version_info.major >= 3 and sys.version_info.minor >= 6
|
||||
|
||||
|
||||
class TestUtil(PillowTestCase):
|
||||
|
||||
|
@ -39,7 +37,7 @@ class TestUtil(PillowTestCase):
|
|||
# Assert
|
||||
self.assertTrue(it_is)
|
||||
|
||||
@unittest.skipIf(not py36, 'os.path support for Paths added in 3.6')
|
||||
@unittest.skipIf(not _util.py36, 'os.path support for Paths added in 3.6')
|
||||
def test_path_obj_is_path(self):
|
||||
# Arrange
|
||||
from pathlib import Path
|
||||
|
|
|
@ -2,7 +2,7 @@ import os
|
|||
import sys
|
||||
|
||||
py3 = sys.version_info.major >= 3
|
||||
py36 = py3 and sys.version_info.minor >= 6
|
||||
py36 = sys.version_info[0:2] >= (3, 6)
|
||||
|
||||
if py3:
|
||||
def isStringType(t):
|
||||
|
|
Loading…
Reference in New Issue
Block a user