[Numpy-svn] r5807 - trunk/numpy/distutils/tests
numpy-svn at scipy.org
numpy-svn at scipy.org
Fri Sep 12 22:56:35 EDT 2008
Author: alan.mcintyre
Date: 2008-09-12 21:56:33 -0500 (Fri, 12 Sep 2008)
New Revision: 5807
Modified:
trunk/numpy/distutils/tests/test_misc_util.py
Log:
Remove unused imports.
Modified: trunk/numpy/distutils/tests/test_misc_util.py
===================================================================
--- trunk/numpy/distutils/tests/test_misc_util.py 2008-09-13 02:53:53 UTC (rev 5806)
+++ trunk/numpy/distutils/tests/test_misc_util.py 2008-09-13 02:56:33 UTC (rev 5807)
@@ -1,10 +1,8 @@
#!/usr/bin/env python
-import os
-import sys
from numpy.testing import *
from numpy.distutils.misc_util import appendpath, minrelpath, gpaths, rel_path
-from os.path import join, sep
+from os.path import join, sep, dirname
ajoin = lambda *paths: join(*((sep,)+paths))
@@ -35,8 +33,7 @@
class TestMinrelpath(TestCase):
def test_1(self):
- import os
- n = lambda path: path.replace('/',os.path.sep)
+ n = lambda path: path.replace('/',sep)
assert_equal(minrelpath(n('aa/bb')),n('aa/bb'))
assert_equal(minrelpath('..'),'..')
assert_equal(minrelpath(n('aa/..')),'')
@@ -50,11 +47,11 @@
class TestGpaths(TestCase):
def test_gpaths(self):
- local_path = minrelpath(os.path.join(os.path.dirname(__file__),'..'))
+ local_path = minrelpath(join(dirname(__file__),'..'))
ls = gpaths('command/*.py', local_path)
- assert os.path.join(local_path,'command','build_src.py') in ls,`ls`
+ assert join(local_path,'command','build_src.py') in ls,`ls`
f = gpaths('system_info.py', local_path)
- assert os.path.join(local_path,'system_info.py')==f[0],`f`
+ assert join(local_path,'system_info.py')==f[0],`f`
if __name__ == "__main__":
More information about the Numpy-svn
mailing list