summaryrefslogtreecommitdiff
path: root/numpy/lib/tests
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r--numpy/lib/tests/test__datasource.py2
-rw-r--r--numpy/lib/tests/test__iotools.py6
-rw-r--r--numpy/lib/tests/test_function_base.py1
-rw-r--r--numpy/lib/tests/test_type_check.py4
4 files changed, 7 insertions, 6 deletions
diff --git a/numpy/lib/tests/test__datasource.py b/numpy/lib/tests/test__datasource.py
index beb252186..3933fdcde 100644
--- a/numpy/lib/tests/test__datasource.py
+++ b/numpy/lib/tests/test__datasource.py
@@ -305,7 +305,7 @@ class TestRepositoryExists(TestCase):
# would do.
scheme, netloc, upath, pms, qry, frg = urlparse(localfile)
local_path = os.path.join(self.repos._destpath, netloc)
- os.mkdir(local_path, 0700)
+ os.mkdir(local_path, 0o0700)
tmpfile = valid_textfile(local_path)
assert_(self.repos.exists(tmpfile))
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"
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index ae68be41f..ca329aae6 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -9,6 +9,7 @@ from numpy.testing import (
)
from numpy.random import rand
from numpy.lib import *
+from numpy.compat import long
class TestAny(TestCase):
diff --git a/numpy/lib/tests/test_type_check.py b/numpy/lib/tests/test_type_check.py
index 280d0b174..25e697924 100644
--- a/numpy/lib/tests/test_type_check.py
+++ b/numpy/lib/tests/test_type_check.py
@@ -3,7 +3,7 @@ from __future__ import division, absolute_import, print_function
from numpy.testing import *
from numpy.lib import *
from numpy.core import *
-from numpy.compat import asbytes
+from numpy.compat import asbytes, long
try:
import ctypes
@@ -87,7 +87,7 @@ class TestIsscalar(TestCase):
assert_(not isscalar([3]))
assert_(not isscalar((3,)))
assert_(isscalar(3j))
- assert_(isscalar(10L))
+ assert_(isscalar(long(10)))
assert_(isscalar(4.0))