From 3c0a31399ced7f6e9eb0d63a6c073b27d42034ff Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Sat, 15 Jun 2019 01:26:32 -0400 Subject: Added unit tests --- tests/test_run_pyscript.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'tests/test_run_pyscript.py') diff --git a/tests/test_run_pyscript.py b/tests/test_run_pyscript.py index 088d9aab..c8b44271 100644 --- a/tests/test_run_pyscript.py +++ b/tests/test_run_pyscript.py @@ -15,7 +15,7 @@ def cmdfinalization_hook(data: plugin.CommandFinalizationData) -> plugin.Command print(HOOK_OUTPUT) return data -def test_run_pyscript_base(base_app, request): +def test_run_pyscript(base_app, request): test_dir = os.path.dirname(request.module.__file__) python_script = os.path.join(test_dir, 'script.py') expected = 'This is a python script running ...' @@ -85,12 +85,7 @@ def test_run_pyscript_stop(base_app, request): stop = base_app.onecmd_plus_hooks('run_pyscript {}'.format(python_script)) assert stop -def test_pyscript_deprecated_but_works(base_app, request): - test_dir = os.path.dirname(request.module.__file__) - python_script = os.path.join(test_dir, 'script.py') - expected = 'This is a python script running ...' - - out, err = run_cmd(base_app, "pyscript {}".format(python_script)) - assert expected in out +def test_pyscript_deprecated(base_app): + """Delete this when pyscript alias is removed""" + _, err = run_cmd(base_app, "pyscript fake") assert "pyscript has been renamed and will be removed" in err[0] - -- cgit v1.2.1