Skip to content

Commit da5c7aa

Browse files
committed
Fix equality in test for Python 3
1 parent b5d3d6c commit da5c7aa

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

python/phonenumbers/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
class UnicodeMixin(object): # pragma no cover
55
"""Define __str__ operator in terms of __unicode__ for Python 2/3"""
6-
if sys.version_info > (3, 0):
6+
if sys.version_info >= (3, 0):
77
__str__ = lambda x: x.__unicode__()
88
else:
99
__str__ = lambda x: unicode(x).encode('utf-8')

python/tests/phonenumberutiltest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
from .testdata import _COUNTRY_CODE_TO_REGION_CODE as TEST_CC_TO_RC
4040
TEST_REGION_METADATA = PhoneMetadata.region_metadata
4141

42-
if sys.version_info > (3, 0):
42+
if sys.version_info >= (3, 0):
4343
# Python 3 has unlimited-precision int, so no 'L' suffix
4444
_LS = ''
4545
# Python 3 has all strings unicode, so no 'u' prefix

0 commit comments

Comments
 (0)