diff --git a/fre/tests/test_fre_pp_cli.py b/fre/tests/test_fre_pp_cli.py index 399c8e3e..7b1602c9 100644 --- a/fre/tests/test_fre_pp_cli.py +++ b/fre/tests/test_fre_pp_cli.py @@ -1,5 +1,7 @@ ''' test "fre pp" calls ''' +import os +from pathlib import Path from click.testing import CliRunner from fre import fre @@ -39,6 +41,13 @@ def test_cli_fre_pp_checkout_opt_dne(): result = runner.invoke(fre.fre, args=["pp", "checkout", "optionDNE"]) assert result.exit_code == 2 +def test_cli_fre_pp_checkout(): + ''' fre pp checkout -e FOO -p BAR -t BAZ''' + result = runner.invoke(fre.fre, args=["pp", "checkout", "-e", "FOO", "-p", "BAR", "-t", "BAZ"]) + directory = os.path.expanduser("~/cylc-src")+'/FOO__BAR__BAZ' + assert all( [ result.exit_code == 0, + Path(directory).exists() ] + #-- fre pp configure-xml def test_cli_fre_pp_configure_xml(): ''' fre pp configure-xml '''