mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.9] bpo-46421: Fix unittest filename evaluation when called as a module (GH-30654) (GH-31970)
(cherry picked from commit a0db11b10f)
Co-authored-by: Bader Zaidan <bader@zaidan.pw>
This commit is contained in:
parent
e808c9d5c7
commit
1cab44d865
4 changed files with 16 additions and 1 deletions
|
|
@ -39,7 +39,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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue