Skip to content

Commit

Permalink
tests: Windows specific filename for gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr. Outis committed Sep 30, 2019
1 parent 80cb1c9 commit 9496f34
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/func/test_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 9496f34

Please sign in to comment.