summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth M Morton <seth.m.morton@gmail.com>2016-03-07 16:31:06 -0800
committerSeth M Morton <seth.m.morton@gmail.com>2016-03-07 16:31:06 -0800
commit4fff90718630d2ea8c41c7f920cd80467e546d8e (patch)
tree486aff97f90973d9c6430d2994ba44ffe06b8b5e
parentb6b46840ad6758ce2d0604f957c6bdff0af597dd (diff)
downloadnatsort-4fff90718630d2ea8c41c7f920cd80467e546d8e.tar.gz
Fixed bug in fake_fastnumbers tests.
The fake fastnumbers strips whitespace, but the tests to determine if a string will pass through the fake fastnumbers function successfully.
-rw-r--r--test_natsort/test_fake_fastnumbers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test_natsort/test_fake_fastnumbers.py b/test_natsort/test_fake_fastnumbers.py
index 6751879..ce31c3d 100644
--- a/test_natsort/test_fake_fastnumbers.py
+++ b/test_natsort/test_fake_fastnumbers.py
@@ -25,7 +25,7 @@ from compat.hypothesis import (
def is_float(x):
try:
- float(x)
+ float(x.strip())
except ValueError:
try:
unicodedata.numeric(x)
@@ -39,7 +39,7 @@ def is_float(x):
def is_int(x):
try:
- int(x)
+ int(x.strip())
except ValueError:
try:
unicodedata.digit(x)