diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2014-07-31 14:30:10 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2014-07-31 14:30:10 -0600 |
commit | ae7c942ced535fb39384aefeb8d32df92fb15988 (patch) | |
tree | d06ae19daed6c32522e3a06fb27afb4490302d0d /numpy/lib/tests/test__datasource.py | |
parent | 2ad538899928c249af456d93f250ebbd7535dcff (diff) | |
parent | 01b0d7e82211b581aaff925e3ccc36cff9ac1895 (diff) | |
download | numpy-ae7c942ced535fb39384aefeb8d32df92fb15988.tar.gz |
Merge pull request #4929 from juliantaylor/charris-pep8-numpy-lib
Charris pep8 numpy lib
Diffstat (limited to 'numpy/lib/tests/test__datasource.py')
-rw-r--r-- | numpy/lib/tests/test__datasource.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/numpy/lib/tests/test__datasource.py b/numpy/lib/tests/test__datasource.py index f61d3086b..090f71f67 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 @@ -63,7 +66,7 @@ def valid_textfile(filedir): def invalid_textfile(filedir): # Generate and return an invalid filename. - fd, path = mkstemp(suffix='.txt', prefix='dstmp_', dir=filedir) + fd, path = mkstemp(suffix='.txt', prefix='dstmp_', dir=filedir) os.close(fd) os.remove(path) return path @@ -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)) |