https://hg.python.org/cpython/rev/2aac2d76035e changeset: 93384:2aac2d76035e user: Robert Collins <rbtcollins at hp.com> date: Wed Nov 05 03:43:36 2014 +1300 summary: Fix regression in issue 22457 fix. When used in the real world it can under some situations trigger " assert not _relpath.startswith('..'), "Path must be within the project" AssertionError: Path must be within the project " Because _get_name_from_path was not expecting to be called with the top level directory. files: Lib/unittest/loader.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/Lib/unittest/loader.py b/Lib/unittest/loader.py --- a/Lib/unittest/loader.py +++ b/Lib/unittest/loader.py @@ -343,6 +343,8 @@ return os.path.dirname(full_path) def _get_name_from_path(self, path): + if path == self._top_level_dir: + return '.' path = _jython_aware_splitext(os.path.normpath(path)) _relpath = os.path.relpath(path, self._top_level_dir) -- Repository URL: https://hg.python.org/cpython
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4