diff --git a/tests/unit/test_ignore.py b/tests/unit/test_ignore.py index 7118f3e4fb..eb591dbf71 100644 --- a/tests/unit/test_ignore.py +++ b/tests/unit/test_ignore.py @@ -168,8 +168,9 @@ def test_match_ignore_from_file( ): from dvc.fs import localfs + root = os.path.sep * (2 if os.name == "nt" else 1) dvcignore_path = os.path.join( - os.path.sep, "full", "path", "to", "ignore", "file", ".dvcignore" + root, "full", "path", "to", "ignore", "file", ".dvcignore" ) dvcignore_dirname = os.path.dirname(dvcignore_path)