cpython: 2aac2d76035e (original) (raw)
Mercurial > cpython
changeset 93384:2aac2d76035e
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. [#22457]
Robert Collins rbtcollins@hp.com | |
---|---|
date | Wed, 05 Nov 2014 03:43:36 +1300 |
parents | ce0dd5e4b801 |
children | 6aaa0aab1e93 |
files | Lib/unittest/loader.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-)[+] [-] Lib/unittest/loader.py 2 |
line wrap: on
line diff
--- a/Lib/unittest/loader.py +++ b/Lib/unittest/loader.py @@ -343,6 +343,8 @@ class TestLoader(object): return os.path.dirname(full_path) def _get_name_from_path(self, path):
if path == self._top_level_dir:[](#l1.7)
return '.'[](#l1.8) path = _jython_aware_splitext(os.path.normpath(path))[](#l1.9)