diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-05-26 16:30:29 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-05-26 16:30:29 +0200 |
commit | 81c3d533a07c6602f07907b82b12d885239ca013 (patch) | |
tree | 08cd1d4b00fb5e9f27d41265470efd559560cd4b /tests/doctests/test_GitRepository.py | |
parent | 0372be09cf6f68c4ade2e74b66cac8251d005a66 (diff) |
GitRepository: add rename_file
Diffstat (limited to 'tests/doctests/test_GitRepository.py')
-rw-r--r-- | tests/doctests/test_GitRepository.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/doctests/test_GitRepository.py b/tests/doctests/test_GitRepository.py index a11211d7..f6e739b7 100644 --- a/tests/doctests/test_GitRepository.py +++ b/tests/doctests/test_GitRepository.py @@ -123,6 +123,22 @@ def test_add_files(): """ +def test_move_file(): + """ + Methods tested: + - L{gbp.git.GitRepository.move_file} + + >>> import gbp.git + >>> repo = gbp.git.GitRepository(dirs['repo']) + >>> repo.rename_file("testfile", "testfile2") + >>> repo.rename_file("testfile2", "testfile") + >>> repo.rename_file("doesnotexit", "testfile2") + Traceback (most recent call last): + ... + GbpError: Failed to move 'doesnotexit' to 'testfile2': fatal: bad source, source=doesnotexit, destination=testfile2 + """ + + def test_branch_master(): """ First branch is called I{master} |