From d759e17181c21379d7274db76d4168cdbb403ccf Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 13 Oct 2019 10:25:02 +0200 Subject: As string is iterable, changed to isinstance check test now works --- git/test/test_index.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'git/test') diff --git a/git/test/test_index.py b/git/test/test_index.py index ee48bae6..065de887 100644 --- a/git/test/test_index.py +++ b/git/test/test_index.py @@ -775,9 +775,11 @@ class TestIndex(TestBase): @with_rw_repo('HEAD', bare=False) def test_index_single_addremove(self, rw_repo): - path = osp.join('git', 'test', 'test_index.py') - self._assert_entries(rw_repo.index.add(path)) - deleted_files = rw_repo.index.remove(path) + fp = osp.join(rw_repo.working_dir, 'testfile.txt') + with open(fp, 'w') as fs: + fs.write(u'content of testfile') + self._assert_entries(rw_repo.index.add(fp)) + deleted_files = rw_repo.index.remove(fp) assert deleted_files def test_index_new(self): -- cgit v1.2.1