Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Make sage.doctest.sources.get_basename work in more situations
Browse files Browse the repository at this point in the history
This lets you specify SAGE_SRC like /path/to/test/dir/../../src/dir, which
avoids post-install test failures in sage/doctest/test.py
  • Loading branch information
infinity0 committed Feb 22, 2017
1 parent 316c6c3 commit 399f911
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sage/doctest/sources.py
Expand Up @@ -85,8 +85,8 @@ def get_basename(path):
root = os.path.dirname(path)
# If the file is in the sage library, we can use our knowledge of
# the directory structure
dev = SAGE_SRC
sp = os.path.join(SAGE_LOCAL, 'lib', 'python', 'site-packages')
dev = os.path.normpath(SAGE_SRC)
sp = os.path.normpath(os.path.join(SAGE_LOCAL, 'lib', 'python', 'site-packages'))
if path.startswith(dev):
# there will be a branch name
i = path.find(os.path.sep, len(dev))
Expand Down

0 comments on commit 399f911

Please sign in to comment.