diff options
author | Marcel <marcel.beining@gmail.com> | 2019-10-13 10:25:02 +0200 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2019-10-15 13:27:48 +0200 |
commit | d759e17181c21379d7274db76d4168cdbb403ccf (patch) | |
tree | a36a651dd63799ab94f4869564e75d3ac0f70810 /git/test/test_index.py | |
parent | 1fa1ce2b7dcf7f1643bb494b71b9857cbfb60090 (diff) | |
download | gitpython-d759e17181c21379d7274db76d4168cdbb403ccf.tar.gz |
As string is iterable, changed to isinstance check
test now works
Diffstat (limited to 'git/test/test_index.py')
-rw-r--r-- | git/test/test_index.py | 8 |
1 files changed, 5 insertions, 3 deletions
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): |