Files
courses/bsawf/09-creating-a-cli-script/cli/commands/cmd_test.py
T
2025-05-20 11:57:43 -04:00

18 lines
332 B
Python

import os
import subprocess
import click
@click.command()
@click.argument('path', default=os.path.join('snakeeyes', 'tests'))
def cli(path):
"""
Run tests with Pytest.
:param path: Test path
:return: Subprocess call result
"""
cmd = 'py.test {0}'.format(path)
return subprocess.call(cmd, shell=True)