Skip to content

Commit

Permalink
Mark test_create_remote_unsafe_url_allowed xfail on Windows
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
EliahKagan committed Nov 24, 2023
1 parent 799c853 commit b284ad7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# This module is part of GitPython and is released under the
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/

import os
import os.path as osp
from pathlib import Path
import random
Expand Down Expand Up @@ -767,6 +768,11 @@ def test_create_remote_unsafe_url(self, rw_repo):
Remote.create(rw_repo, "origin", url)
assert not tmp_file.exists()

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

0 comments on commit b284ad7

Please sign in to comment.