Skip to content

Commit 2c16de4

Browse files
committed
Fixed test.
1 parent 8a0410a commit 2c16de4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/repository/test_repository.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from stat import S_IFDIR, S_IFREG
1919

2020
import pytest
21-
from mock import MagicMock, patch, call
21+
from mock import MagicMock, patch, call, ANY
2222
from pygit2 import (GIT_BRANCH_REMOTE, GIT_SORT_TIME,
2323
GIT_FILEMODE_BLOB, GIT_STATUS_CURRENT)
2424

@@ -468,9 +468,7 @@ def contains(self, path):
468468
assert repo.checkout("ref", "args") == "done"
469469
assert mocked_repo.status.call_count == 1
470470
mocked_checkout.assert_called_once_with("ref", "args")
471-
mocked_rmtree.assert_called_once_with(
472-
"full_path", onerror=Repository.checkout_fail_rmtree_callback
473-
)
471+
mocked_rmtree.assert_called_once_with("full_path", onerror=ANY)
474472
mocked_os.lstat.assert_called_once_with("full_path")
475473
mocked_os.chmod.assert_called_once_with("full_path",
476474
"16877")

0 commit comments

Comments
 (0)