summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test__datasource.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2014-07-30 14:17:00 -0600
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-07-31 21:07:59 +0200
commitb2955ede452b8ca2aae5d0b035cd19c8a3b12480 (patch)
tree9650423c39ce77ba9831751094087d3c14687a5b /numpy/lib/tests/test__datasource.py
parent778af02eb7c1668e751f435cd2a4952a362a0433 (diff)
downloadnumpy-b2955ede452b8ca2aae5d0b035cd19c8a3b12480.tar.gz
MAINT: Fix problems noted by pyflakes in numpy/lib/tests.
Diffstat (limited to 'numpy/lib/tests/test__datasource.py')
-rw-r--r--numpy/lib/tests/test__datasource.py9
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))