Skip to content

Commit 3c5038e

Browse files
committed
Mark test_create_remote_unsafe_url_allowed xfail on Windows
The test mostly works on Windows, but it fails because the tmp_file path is expected to appear in remote_url with backslash separators, but (forward) slashes appear instead.
1 parent 166a913 commit 3c5038e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: test/test_remote.py

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# This module is part of GitPython and is released under the
44
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
55

6+
import os
67
import os.path as osp
78
from pathlib import Path
89
import random
@@ -767,6 +768,11 @@ def test_create_remote_unsafe_url(self, rw_repo):
767768
Remote.create(rw_repo, "origin", url)
768769
assert not tmp_file.exists()
769770

771+
@pytest.mark.xfail(
772+
os.name == "nt",
773+
reason=R"Multiple '\' instead of '/' in remote.url make it differ from expected value",
774+
raises=AssertionError,
775+
)
770776
@with_rw_repo("HEAD")
771777
def test_create_remote_unsafe_url_allowed(self, rw_repo):
772778
with tempfile.TemporaryDirectory() as tdir:

0 commit comments

Comments
 (0)