Feb. 28, 2006
2:21 p.m.
In numpytest.py, set_package_path is provided for handling path changes while doing unit tests. It reads def set_package_path(level=1): """ Prepend package directory to sys.path. set_package_path should be called from a test_file.py that satisfies the following tree structure: <somepath>/<somedir>/test_file.py Then the first existing path name from the following list <somepath>/build/lib.<platform>-<version> <somepath>/.. is prepended to sys.path. ... However, the line that supposedly calculates "somepath/.." is d = os.path.dirname(os.path.dirname(os.path.abspath(testfile))) which calculates "somepath". Which is wrong: the docstring, the code or my interpretation? Stéfan