diff options
author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-01 16:02:20 +0200 |
---|---|---|
committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-01 16:33:20 +0200 |
commit | b8b025f719b2c3203e194580bbd0785a26c08ebd (patch) | |
tree | 8cec9ba13035f9489fdaa56e550e93bc976372fc /git/test/test_submodule.py | |
parent | a79cf677744e2c1721fa55f934fa07034bc54b0a (diff) | |
download | gitpython-b8b025f719b2c3203e194580bbd0785a26c08ebd.tar.gz |
Win, #519: FIX repo TCs.
+ FIX TestRepo.test_submodule_update():
+ submod: del `.git` file prior overwrite; Windows denied otherwise!
+ FIX TestRepo.test_untracked_files():
+ In the `git add <file>` case, it failed with unicode args on PY2.
Had to
encode them with `locale.getpreferredencoding()` AND use SHELL.
+ cmd: add `shell` into `execute()` kwds, for overriding USE_SHELL per
command.
+ repo: replace blocky `communicate()` in `_clone()` with thread-pumps.
+ test_repo.py: unittestize (almost all) assertions.
+ Replace open --> with open for index (base and TC).
+ test_index.py: Enabled a dormant assertion.
Diffstat (limited to 'git/test/test_submodule.py')
-rw-r--r-- | git/test/test_submodule.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/git/test/test_submodule.py b/git/test/test_submodule.py index dcfe9216..8e2829b2 100644 --- a/git/test/test_submodule.py +++ b/git/test/test_submodule.py @@ -309,7 +309,8 @@ class TestSubmodule(TestBase): # but ... we have untracked files in the child submodule fn = join_path_native(csm.module().working_tree_dir, "newfile") - open(fn, 'w').write("hi") + with open(fn, 'w') as fd: + fd.write("hi") self.failUnlessRaises(InvalidGitRepositoryError, sm.remove) # forcibly delete the child repository |