summaryrefslogtreecommitdiff
path: root/test/test_git.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_git.py')
-rw-r--r--test/test_git.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/test_git.py b/test/test_git.py
index 427c54a..76eccab 100644
--- a/test/test_git.py
+++ b/test/test_git.py
@@ -5,7 +5,7 @@ import pytest
@pytest.mark.usefixtures('ds1_copy')
-def test_git(runner, yadm_y, paths):
+def test_git(runner, yadm_cmd, paths):
"""Test series of passthrough git commands
Passthru unknown commands to Git
@@ -17,14 +17,14 @@ def test_git(runner, yadm_y, paths):
"""
# passthru unknown commands to Git
- run = runner(command=yadm_y('bogus'))
+ run = runner(command=yadm_cmd('bogus'))
assert run.failure
assert "git: 'bogus' is not a git command." in run.err
assert "See 'git --help'" in run.err
assert run.out == ''
# git command 'add' - badfile
- run = runner(command=yadm_y('add', '-v', 'does_not_exist'))
+ run = runner(command=yadm_cmd('add', '-v', 'does_not_exist'))
assert run.code == 128
assert "pathspec 'does_not_exist' did not match any files" in run.err
assert run.out == ''
@@ -32,19 +32,19 @@ def test_git(runner, yadm_y, paths):
# git command 'add'
newfile = paths.work.join('test_git')
newfile.write('test_git')
- run = runner(command=yadm_y('add', '-v', str(newfile)))
+ run = runner(command=yadm_cmd('add', '-v', str(newfile)))
assert run.success
assert run.err == ''
assert "add 'test_git'" in run.out
# git command 'status'
- run = runner(command=yadm_y('status'))
+ run = runner(command=yadm_cmd('status'))
assert run.success
assert run.err == ''
assert re.search(r'new file:\s+test_git', run.out)
# git command 'commit'
- run = runner(command=yadm_y('commit', '-m', 'Add test_git'))
+ run = runner(command=yadm_cmd('commit', '-m', 'Add test_git'))
assert run.success
assert run.err == ''
assert '1 file changed' in run.out
@@ -52,7 +52,7 @@ def test_git(runner, yadm_y, paths):
assert re.search(r'create mode .+ test_git', run.out)
# git command 'log'
- run = runner(command=yadm_y('log', '--oneline'))
+ run = runner(command=yadm_cmd('log', '--oneline'))
assert run.success
assert run.err == ''
assert 'Add test_git' in run.out