summaryrefslogtreecommitdiffstats
path: root/Lib/unittest
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/unittest')
-rw-r--r--Lib/unittest/loader.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/unittest/loader.py b/Lib/unittest/loader.py
index 8c10ad1..8ee6c56 100644
--- 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:
+ return '.'
path = _jython_aware_splitext(os.path.normpath(path))
_relpath = os.path.relpath(path, self._top_level_dir)