Add xfail mark for new test_index_mutation failure · gitpython-developers/GitPython@12bbace (original) (raw)

`@@ -17,17 +17,21 @@

`

17

17

`from sumtypes import constructor, sumtype

`

18

18

``

19

19

`from git import (

`

``

20

`+

BlobFilter,

`

``

21

`+

Diff,

`

``

22

`+

Git,

`

20

23

`IndexFile,

`

``

24

`+

Object,

`

21

25

`Repo,

`

22

``

`-

BlobFilter,

`

23

``

`-

UnmergedEntriesError,

`

24

26

`Tree,

`

25

``

`-

Object,

`

26

``

`-

Diff,

`

27

``

`-

GitCommandError,

`

``

27

`+

)

`

``

28

`+

from git.exc import (

`

28

29

`CheckoutError,

`

``

30

`+

GitCommandError,

`

``

31

`+

HookExecutionError,

`

``

32

`+

InvalidGitRepositoryError,

`

``

33

`+

UnmergedEntriesError,

`

29

34

`)

`

30

``

`-

from git.exc import HookExecutionError, InvalidGitRepositoryError

`

31

35

`from git.index.fun import hook_path

`

32

36

`from git.index.typ import BaseIndexEntry, IndexEntry

`

33

37

`from git.objects import Blob

`

`@@ -530,6 +534,11 @@ def _count_existing(self, repo, files):

`

530

534

``

531

535

`# END num existing helper

`

532

536

``

``

537

`+

@pytest.mark.xfail(

`

``

538

`+

os.name == "nt" and Git().config("core.symlinks") == "true",

`

``

539

`+

reason="Assumes symlinks are not created on Windows and opens a symlink to a nonexistent target.",

`

``

540

`+

raises=FileNotFoundError,

`

``

541

`+

)

`

533

542

`@with_rw_repo("0.1.6")

`

534

543

`def test_index_mutation(self, rw_repo):

`

535

544

`index = rw_repo.index

`

`@@ -740,7 +749,7 @@ def mixed_iterator():

`

740

749

`# END for each target

`

741

750

`# END real symlink test

`

742

751

``

743

``

`-

Add fake symlink and assure it checks-our as symlink.

`

``

752

`+

Add fake symlink and assure it checks out as a symlink.

`

744

753

`fake_symlink_relapath = "my_fake_symlink"

`

745

754

`link_target = "/etc/that"

`

746

755

`fake_symlink_path = self._make_file(fake_symlink_relapath, link_target, rw_repo)

`

`@@ -774,7 +783,7 @@ def mixed_iterator():

`

774

783

`os.remove(fake_symlink_path)

`

775

784

`index.checkout(fake_symlink_path)

`

776

785

``

777

``

`-

On Windows, we will never get symlinks.

`

``

786

`+

On Windows, we currently assume we will never get symlinks.

`

778

787

`if os.name == "nt":

`

779

788

`# Symlinks should contain the link as text (which is what a

`

780

789

`# symlink actually is).

`