diff options
Diffstat (limited to 'numpy/lib/tests/test__datasource.py')
-rw-r--r-- | numpy/lib/tests/test__datasource.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/numpy/lib/tests/test__datasource.py b/numpy/lib/tests/test__datasource.py index f61d3086b..89198f2bf 100644 --- a/numpy/lib/tests/test__datasource.py +++ b/numpy/lib/tests/test__datasource.py @@ -2,11 +2,14 @@ from __future__ import division, absolute_import, print_function import os import sys -import numpy.lib._datasource as datasource from tempfile import mkdtemp, mkstemp, NamedTemporaryFile from shutil import rmtree + from numpy.compat import asbytes -from numpy.testing import * +from numpy.testing import ( + run_module_suite, TestCase, assert_ + ) +import numpy.lib._datasource as datasource if sys.version_info[0] >= 3: import urllib.request as urllib_request @@ -213,7 +216,7 @@ class TestDataSourceAbspath(TestCase): tmpfile = valid_textfile(self.tmpdir) tmpfilename = os.path.split(tmpfile)[-1] # Test with filename only - self.assertEqual(tmpfile, self.ds.abspath(os.path.split(tmpfile)[-1])) + self.assertEqual(tmpfile, self.ds.abspath(tmpfilename)) # Test filename with complete path self.assertEqual(tmpfile, self.ds.abspath(tmpfile)) |