diff options
author | Bader Zaidan <bader@zaidan.pw> | 2022-03-17 23:37:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-17 23:37:52 (GMT) |
commit | a0db11b10fca0fee6bb2b8d6277e266bad8c0fdb (patch) | |
tree | 156a2aa456e37ceaa2eed93c5baf03f19c912829 /Lib/unittest/main.py | |
parent | ac8308d3eaf2526318c1bbf13d4a214fd24605d2 (diff) | |
download | cpython-a0db11b10fca0fee6bb2b8d6277e266bad8c0fdb.zip cpython-a0db11b10fca0fee6bb2b8d6277e266bad8c0fdb.tar.gz cpython-a0db11b10fca0fee6bb2b8d6277e266bad8c0fdb.tar.bz2 |
bpo-46421: Fix unittest filename evaluation when called as a module (GH-30654)
Diffstat (limited to 'Lib/unittest/main.py')
-rw-r--r-- | Lib/unittest/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/unittest/main.py b/Lib/unittest/main.py index cb8f1f3..046fbd3 100644 --- a/Lib/unittest/main.py +++ b/Lib/unittest/main.py @@ -40,7 +40,7 @@ def _convert_name(name): name = rel_path # on Windows both '\' and '/' are used as path # separators. Better to replace both than rely on os.path.sep - return name[:-3].replace('\\', '.').replace('/', '.') + return os.path.normpath(name)[:-3].replace('\\', '.').replace('/', '.') return name def _convert_names(names): |