tests: Windows specific filename for gitignore

This commit is contained in:
Mr. Outis
2019-09-30 11:28:38 -05:00
parent 80cb1c919a
commit 9496f34f45
+8 -2
View File
@@ -637,8 +637,14 @@ def test_should_protect_on_repeated_add(link, dvc_repo, repo_dir):
def test_escape_gitignore_entries(git, dvc_repo, repo_dir):
fname = "file!with*weird#naming_[1].txt"
ignored_fname = r"/file\!with\*weird\#naming_\[1\].txt"
fname = "file!with*weird#naming_[1].t?t"
ignored_fname = r"/file\!with\*weird\#naming_\[1\].t\?t"
if os.name == "nt":
# Some characters are not supported by Windows in the filename
# https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
fname = "file!with_weird#naming_[1].txt"
ignored_fname = r"/file\!with_weird\#naming_\[1\].txt"
os.rename(repo_dir.FOO, fname)