summaryrefslogtreecommitdiff
path: root/numpy/distutils/tests
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2006-02-11 15:18:36 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2006-02-11 15:18:36 +0000
commit7d4d958724a9ea5259680e84a46837b86b1aefa8 (patch)
tree1b6a34dec78e8916f8d1ce964408a471e23814c3 /numpy/distutils/tests
parent8ee6df7668b3ae0568573620153e71e36c9c399a (diff)
downloadnumpy-7d4d958724a9ea5259680e84a46837b86b1aefa8.tar.gz
Fixed minrelpath tests for platforms where os.path.sep<>'/'.
Diffstat (limited to 'numpy/distutils/tests')
-rw-r--r--numpy/distutils/tests/test_misc_util.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/numpy/distutils/tests/test_misc_util.py b/numpy/distutils/tests/test_misc_util.py
index f88bf4b32..9ff1b45fc 100644
--- a/numpy/distutils/tests/test_misc_util.py
+++ b/numpy/distutils/tests/test_misc_util.py
@@ -32,13 +32,15 @@ class test_appendpath(ScipyTestCase):
class test_minrelpath(ScipyTestCase):
def check_1(self):
- assert_equal(minrelpath(join('aa/bb')),'aa/bb')
- assert_equal(minrelpath(join('..')),'..')
- assert_equal(minrelpath(join('aa/..')),'')
- assert_equal(minrelpath(join('aa/../bb')),'bb')
- assert_equal(minrelpath(join('aa/bb/..')),'aa')
- assert_equal(minrelpath(join('aa/bb/../..')),'')
- assert_equal(minrelpath(join('aa/bb/../cc/../dd')),'aa/dd')
+ import os
+ n = lambda path: path.replace('/',os.path.sep)
+ assert_equal(minrelpath(n('aa/bb')),n('aa/bb'))
+ assert_equal(minrelpath('..'),'..')
+ assert_equal(minrelpath(n('aa/..')),'')
+ assert_equal(minrelpath(n('aa/../bb')),'bb')
+ assert_equal(minrelpath(n('aa/bb/..')),'aa')
+ assert_equal(minrelpath(n('aa/bb/../..')),'')
+ assert_equal(minrelpath(n('aa/bb/../cc/../dd')),n('aa/dd'))
if __name__ == "__main__":
ScipyTest().run()