diff options
author | Seth M Morton <seth.m.morton@gmail.com> | 2016-05-03 01:17:13 -0700 |
---|---|---|
committer | Seth M Morton <seth.m.morton@gmail.com> | 2016-05-03 01:17:13 -0700 |
commit | 851b8c16d62f22e781a9272d9295b92c4b94d91b (patch) | |
tree | 1ea09bb71f57e410bc78269f777b0f2ac4da20b4 | |
parent | 711f1020a929a8e91a1f1f3ff2f58d4e0e6dc532 (diff) | |
download | natsort-851b8c16d62f22e781a9272d9295b92c4b94d91b.tar.gz |
Fixed rare false failure in test_fake_fastnumbers.
-rw-r--r-- | test_natsort/test_fake_fastnumbers.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test_natsort/test_fake_fastnumbers.py b/test_natsort/test_fake_fastnumbers.py index 748ed1f..a08dcbd 100644 --- a/test_natsort/test_fake_fastnumbers.py +++ b/test_natsort/test_fake_fastnumbers.py @@ -4,6 +4,7 @@ Test the fake fastnumbers module. """ from __future__ import unicode_literals +import sys import pytest import unicodedata from math import isnan @@ -20,6 +21,9 @@ from compat.hypothesis import ( use_hypothesis, ) +if sys.version[0] == '3': + long = int + def is_float(x): try: @@ -37,7 +41,7 @@ def is_float(x): def is_int(x): try: - int(x) + long(x) except ValueError: try: unicodedata.digit(x) @@ -48,6 +52,7 @@ def is_int(x): else: return True + # Each test has an "example" version for demonstrative purposes, # and a test that uses the hypothesis module. |