Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commite359718

Browse files
committed
Revert "Add xfail marks for IndexFile.from_tree failures"
This removes the xfail marks from 8 tests that fail due to#1630,to be fixed in the subsequent commits.This reverts commit6e477e3.
1 parent96acc22 commite359718

File tree

4 files changed

+5
-74
lines changed

4 files changed

+5
-74
lines changed

‎test/test_docs.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
importpytest
1010

11-
fromgit.excimportGitCommandError
1211
fromtest.libimportTestBase
1312
fromtest.lib.helperimportwith_rw_directory
1413

14+
importos.path
15+
1516

1617
classTutorials(TestBase):
1718
deftearDown(self):
@@ -206,14 +207,6 @@ def update(self, op_code, cur_count, max_count=None, message=""):
206207
assertsm.module_exists()# The submodule's working tree was checked out by update.
207208
# ![14-test_init_repo_object]
208209

209-
@pytest.mark.xfail(
210-
os.name=="nt",
211-
reason=(
212-
"IndexFile.from_tree is broken on Windows (related to NamedTemporaryFile), see #1630.\n"
213-
"'git read-tree --index-output=...' fails with 'fatal: unable to write new index file'."
214-
),
215-
raises=GitCommandError,
216-
)
217210
@with_rw_directory
218211
deftest_references_and_objects(self,rw_dir):
219212
# [1-test_references_and_objects]

‎test/test_fun.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@
33

44
fromioimportBytesIO
55
fromstatimportS_IFDIR,S_IFREG,S_IFLNK,S_IXUSR
6-
importos
6+
fromosimportstat
77
importos.pathasosp
88

9-
importpytest
10-
119
fromgitimportGit
12-
fromgit.excimportGitCommandError
1310
fromgit.indeximportIndexFile
1411
fromgit.index.funimport (
1512
aggressive_tree_merge,
@@ -37,14 +34,6 @@ def _assert_index_entries(self, entries, trees):
3734
assert (entry.path,entry.stage)inindex.entries
3835
# END assert entry matches fully
3936

40-
@pytest.mark.xfail(
41-
os.name=="nt",
42-
reason=(
43-
"IndexFile.from_tree is broken on Windows (related to NamedTemporaryFile), see #1630.\n"
44-
"'git read-tree --index-output=...' fails with 'fatal: unable to write new index file'."
45-
),
46-
raises=GitCommandError,
47-
)
4837
deftest_aggressive_tree_merge(self):
4938
# Head tree with additions, removals and modification compared to its predecessor.
5039
odb=self.rorepo.odb
@@ -302,12 +291,12 @@ def test_linked_worktree_traversal(self, rw_dir):
302291
rw_master.git.worktree("add",worktree_path,branch.name)
303292

304293
dotgit=osp.join(worktree_path,".git")
305-
statbuf=os.stat(dotgit)
294+
statbuf=stat(dotgit)
306295
self.assertTrue(statbuf.st_mode&S_IFREG)
307296

308297
gitdir=find_worktree_git_dir(dotgit)
309298
self.assertIsNotNone(gitdir)
310-
statbuf=os.stat(gitdir)
299+
statbuf=stat(gitdir)
311300
self.assertTrue(statbuf.st_mode&S_IFDIR)
312301

313302
deftest_tree_entries_from_data_with_failing_name_decode_py3(self):

‎test/test_index.py

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -284,14 +284,6 @@ def add_bad_blob():
284284
exceptExceptionasex:
285285
assert"index.lock' could not be obtained"notinstr(ex)
286286

287-
@pytest.mark.xfail(
288-
os.name=="nt",
289-
reason=(
290-
"IndexFile.from_tree is broken on Windows (related to NamedTemporaryFile), see #1630.\n"
291-
"'git read-tree --index-output=...' fails with 'fatal: unable to write new index file'."
292-
),
293-
raises=GitCommandError,
294-
)
295287
@with_rw_repo("0.1.6")
296288
deftest_index_file_from_tree(self,rw_repo):
297289
common_ancestor_sha="5117c9c8a4d3af19a9958677e45cda9269de1541"
@@ -342,14 +334,6 @@ def test_index_file_from_tree(self, rw_repo):
342334
# END for each blob
343335
self.assertEqual(num_blobs,len(three_way_index.entries))
344336

345-
@pytest.mark.xfail(
346-
os.name=="nt",
347-
reason=(
348-
"IndexFile.from_tree is broken on Windows (related to NamedTemporaryFile), see #1630.\n"
349-
"'git read-tree --index-output=...' fails with 'fatal: unable to write new index file'."
350-
),
351-
raises=GitCommandError,
352-
)
353337
@with_rw_repo("0.1.6")
354338
deftest_index_merge_tree(self,rw_repo):
355339
# A bit out of place, but we need a different repo for this:
@@ -412,14 +396,6 @@ def test_index_merge_tree(self, rw_repo):
412396
self.assertEqual(len(unmerged_blobs),1)
413397
self.assertEqual(list(unmerged_blobs.keys())[0],manifest_key[0])
414398

415-
@pytest.mark.xfail(
416-
os.name=="nt",
417-
reason=(
418-
"IndexFile.from_tree is broken on Windows (related to NamedTemporaryFile), see #1630.\n"
419-
"'git read-tree --index-output=...' fails with 'fatal: unable to write new index file'."
420-
),
421-
raises=GitCommandError,
422-
)
423399
@with_rw_repo("0.1.6")
424400
deftest_index_file_diffing(self,rw_repo):
425401
# Default Index instance points to our index.
@@ -554,14 +530,6 @@ def _count_existing(self, repo, files):
554530

555531
# END num existing helper
556532

557-
@pytest.mark.xfail(
558-
os.name=="nt",
559-
reason=(
560-
"IndexFile.from_tree is broken on Windows (related to NamedTemporaryFile), see #1630.\n"
561-
"'git read-tree --index-output=...' fails with 'fatal: unable to write new index file'."
562-
),
563-
raises=GitCommandError,
564-
)
565533
@with_rw_repo("0.1.6")
566534
deftest_index_mutation(self,rw_repo):
567535
index=rw_repo.index
@@ -915,14 +883,6 @@ def make_paths():
915883
forabsfileinabsfiles:
916884
assertosp.isfile(absfile)
917885

918-
@pytest.mark.xfail(
919-
os.name=="nt",
920-
reason=(
921-
"IndexFile.from_tree is broken on Windows (related to NamedTemporaryFile), see #1630.\n"
922-
"'git read-tree --index-output=...' fails with 'fatal: unable to write new index file'."
923-
),
924-
raises=GitCommandError,
925-
)
926886
@with_rw_repo("HEAD")
927887
deftest_compare_write_tree(self,rw_repo):
928888
"""Test writing all trees, comparing them for equality."""

‎test/test_refs.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@
44
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
55

66
fromitertoolsimportchain
7-
importos
87
frompathlibimportPath
98

10-
importpytest
11-
129
fromgitimport (
1310
Reference,
1411
Head,
@@ -218,14 +215,6 @@ def test_head_checkout_detached_head(self, rw_repo):
218215
assertisinstance(res,SymbolicReference)
219216
assertres.name=="HEAD"
220217

221-
@pytest.mark.xfail(
222-
os.name=="nt",
223-
reason=(
224-
"IndexFile.from_tree is broken on Windows (related to NamedTemporaryFile), see #1630.\n"
225-
"'git read-tree --index-output=...' fails with 'fatal: unable to write new index file'."
226-
),
227-
raises=GitCommandError,
228-
)
229218
@with_rw_repo("0.1.6")
230219
deftest_head_reset(self,rw_repo):
231220
cur_head=rw_repo.head

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp