Skip to content

Commit

Permalink
refactor test_config.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Obijuan committed Feb 24, 2024
1 parent 307b3be commit a02fb5c
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions test/env_commands/test_config.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
"""
Test for the "apio config" command
"""

# -- apio config entry point
from apio.commands.config import cli as cmd_config


def test_config(clirunner, validate_cliresult, configenv):
"""Test "apio config" with different parameters"""

with clirunner.isolated_filesystem():

# -- Config the environment (conftest.configenv())
configenv()

# -- Execute "apio config"
result = clirunner.invoke(cmd_config)
validate_cliresult(result)


def test_config_list(clirunner, validate_cliresult, configenv):
with clirunner.isolated_filesystem():
configenv()
# -- Execute "apio config --list"
result = clirunner.invoke(cmd_config, ['--list'])
validate_cliresult(result)


def test_config_exe(clirunner, validate_cliresult, configenv):
with clirunner.isolated_filesystem():
configenv()
# -- Execute "apio config --exe native"
result = clirunner.invoke(cmd_config, ['--exe', 'native'])
validate_cliresult(result)

0 comments on commit a02fb5c

Please sign in to comment.