diff --git a/tests/rules/test_git_push_pull.py b/tests/rules/test_git_push_pull.py index afa74748..93e41bc2 100644 --- a/tests/rules/test_git_push_pull.py +++ b/tests/rules/test_git_push_pull.py @@ -39,12 +39,7 @@ To /tmp/bar @pytest.mark.parametrize('command', [ Command(script='git push', stderr=git_err), Command(script='git push nvbn', stderr=git_err), - Command(script='git push nvbn master', stderr=git_err)]) -def test_match(command): - assert match(command) - - -@pytest.mark.parametrize('command', [ + Command(script='git push nvbn master', stderr=git_err), Command(script='git push', stderr=git_err2), Command(script='git push nvbn', stderr=git_err2), Command(script='git push nvbn master', stderr=git_err2)]) @@ -68,12 +63,7 @@ def test_not_match(command): (Command(script='git push nvbn', stderr=git_err), 'git pull nvbn && git push nvbn'), (Command(script='git push nvbn master', stderr=git_err), - 'git pull nvbn master && git push nvbn master')]) -def test_get_new_command(command, output): - assert get_new_command(command) == output - - -@pytest.mark.parametrize('command, output', [ + 'git pull nvbn master && git push nvbn master'), (Command(script='git push', stderr=git_err2), 'git pull && git push'), (Command(script='git push nvbn', stderr=git_err2), 'git pull nvbn && git push nvbn'), diff --git a/tests/rules/test_ln_s_order.py b/tests/rules/test_ln_s_order.py index d4119f40..8501b664 100644 --- a/tests/rules/test_ln_s_order.py +++ b/tests/rules/test_ln_s_order.py @@ -11,16 +11,6 @@ def file_exists(mocker): get_stderr = "ln: failed to create symbolic link '{}': File exists".format -@pytest.mark.usefixtures('file_exists') -@pytest.mark.parametrize('script', [ - 'ln -s dest source', - 'ln dest -s source', - 'ln dest source -s']) -def test_match(script): - stderr = get_stderr('source') - assert match(Command(script, stderr=stderr)) - - @pytest.mark.parametrize('script, stderr, exists', [ ('ln dest source', get_stderr('source'), True), ('ls -s dest source', get_stderr('source'), True), @@ -38,4 +28,5 @@ def test_not_match(file_exists, script, stderr, exists): ('ln dest source -s', 'ln source -s dest')]) def test_match(script, result): stderr = get_stderr('source') + assert match(Command(script, stderr=stderr)) assert get_new_command(Command(script, stderr=stderr)) == result