Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4abab92

Browse filesBrowse files
committed
Mark test_conditional_includes_from_git_dir xfail on Windows
As noted, the second of the config._included_paths() assertions fails, which is in the "Ensure that config is included if path is matching git_dir" sub-case. It is returning 0 on Windows. THe GitConfigParser._has_includes function returns the expression: self._merge_includes and len(self._included_paths()) Since _merge_includes is a bool, it appears the first branch of the "and" is True, but then _included_paths returns an empty list.
1 parent 42a3d74 commit 4abab92
Copy full SHA for 4abab92

File tree

Expand file treeCollapse file tree

1 file changed

+9
-8
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-8
lines changed

‎test/test_config.py

Copy file name to clipboardExpand all lines: test/test_config.py
+9-8Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,15 @@
66
import glob
77
import io
88
import os
9+
import os.path as osp
910
from unittest import mock
1011

12+
import pytest
13+
1114
from git import GitConfigParser
1215
from git.config import _OMD, cp
13-
from test.lib import (
14-
TestCase,
15-
fixture_path,
16-
SkipTest,
17-
)
18-
from test.lib import with_rw_directory
19-
20-
import os.path as osp
2116
from git.util import rmfile
17+
from test.lib import SkipTest, TestCase, fixture_path, with_rw_directory
2218

2319

2420
_tc_lock_fpaths = osp.join(osp.dirname(__file__), "fixtures/*.lock")
@@ -239,6 +235,11 @@ def check_test_value(cr, value):
239235
with GitConfigParser(fpa, read_only=True) as cr:
240236
check_test_value(cr, tv)
241237

238+
@pytest.mark.xfail(
239+
os.name == "nt",
240+
reason='Second config._has_includes() assertion fails (for "config is included if path is matching git_dir")',
241+
raises=AssertionError,
242+
)
242243
@with_rw_directory
243244
def test_conditional_includes_from_git_dir(self, rw_dir):
244245
# Initiate repository path.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.