summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test__iotools.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-04-11 14:31:52 -0600
committerCharles Harris <charlesr.harris@gmail.com>2013-04-13 07:43:56 -0600
commit7f5af37e26ba2e99ad3ee6928b78437f601e96e0 (patch)
tree1b210bb7361ce691e781884bf06f89c7ebd13360 /numpy/lib/tests/test__iotools.py
parent74b08b3f0284d9d2dd55a15dd98a3846913b1b51 (diff)
downloadnumpy-7f5af37e26ba2e99ad3ee6928b78437f601e96e0.tar.gz
2to3: Apply the `numliterals` fixer and skip the `long` fixer.
The numliterals fixer replaces the old style octal number like '01' by '0o1' removes the 'L' suffix. Octal values were previously mistakenly specified in some dates, those uses have been corrected by removing the leading zeros. Simply Removing the 'L' suffix should not be a problem, but in some testing code it looks neccesary, so in those places the Python long constructor is used instead. The 'long' type is no longer defined in Python 3. Because we need to have it defined for Python 2 it is added to numpy/compat/np3k.py where it is defined as 'int' for Python 3 and 'long' for Python 2. The `long` fixer then needs to be skipped so that it doesn't undo the good work. Closes #3074, #3067.
Diffstat (limited to 'numpy/lib/tests/test__iotools.py')
-rw-r--r--numpy/lib/tests/test__iotools.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/lib/tests/test__iotools.py b/numpy/lib/tests/test__iotools.py
index 63d0ac2ef..421616ccd 100644
--- a/numpy/lib/tests/test__iotools.py
+++ b/numpy/lib/tests/test__iotools.py
@@ -175,11 +175,11 @@ class TestStringConverter(TestCase):
StringConverter.upgrade_mapper(dateparser, date(2000, 1, 1))
convert = StringConverter(dateparser, date(2000, 1, 1))
test = convert(asbytes('2001-01-01'))
- assert_equal(test, date(2001, 01, 01))
+ assert_equal(test, date(2001, 1, 1))
test = convert(asbytes('2009-01-01'))
- assert_equal(test, date(2009, 01, 01))
+ assert_equal(test, date(2009, 1, 1))
test = convert(asbytes(''))
- assert_equal(test, date(2000, 01, 01))
+ assert_equal(test, date(2000, 1, 1))
#
def test_string_to_object(self):
"Make sure that string-to-object functions are properly recognized"