Skip to content

Commit

Permalink
Work on mctools_same_file on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tkittel committed Nov 17, 2024
1 parent dccf180 commit 7d20229
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/scripts/cfileutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,17 @@ def test2():
print(f'{i} Testing path "{p}":')
for fct in fctnames:
res = getattr(lib,f'nctest_{fct}')(p)
res_print = res
if isinstance(res,str):
res_print = res_print.replace(native_sep,'/')
if len(res)>=2 and res[1]==':':
assert res[0] == res[0].upper()
forbid_sep, allow_sep = nonnative_sep, native_sep
if fct=='pathseps_generic':
forbid_sep, allow_sep = '\\', '/'
assert forbid_sep not in res
res = res.replace(allow_sep,'/')
print(f' mctools_{fct} = "{res}"')
print(f' mctools_{fct} = "{res_print}"')

#test versus refs, but pathlib and os.path does not like back slashes on
#unix:
Expand Down

0 comments on commit 7d20229

Please sign in to comment.