diff options
| author | Pearu Peterson <pearu.peterson@gmail.com> | 2004-03-28 19:54:30 +0000 |
|---|---|---|
| committer | Pearu Peterson <pearu.peterson@gmail.com> | 2004-03-28 19:54:30 +0000 |
| commit | 406a04b80cbdfdc457a1723a64c8cc5a8050aaa7 (patch) | |
| tree | 6c2223579d3eca8945ba731259dc1b56423b661a | |
| parent | 5f5c7744d8d35c362fecca2df2ce556119757362 (diff) | |
| download | numpy-406a04b80cbdfdc457a1723a64c8cc5a8050aaa7.tar.gz | |
Introduced reldir argument to set_local_path.
| -rw-r--r-- | scipy_test/testing.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scipy_test/testing.py b/scipy_test/testing.py index bfe2715fa..671f773f9 100644 --- a/scipy_test/testing.py +++ b/scipy_test/testing.py @@ -52,7 +52,7 @@ def set_package_path(level=1): sys.path.insert(0,d1) __all__.append('set_local_path') -def set_local_path(level=1): +def set_local_path(reldir='', level=1): """ Prepend local directory to sys.path. The caller is responsible for removing this path by using @@ -65,7 +65,7 @@ def set_local_path(level=1): testfile = sys.argv[0] else: testfile = f.f_locals['__file__'] - local_path = os.path.dirname(os.path.abspath(testfile)) + local_path = os.path.join(os.path.dirname(os.path.abspath(testfile)),reldir) if DEBUG: print 'Inserting %r to sys.path' % (local_path) sys.path.insert(0,local_path) |
