Skip to main content

Test for script result.

Project description

Cli_results

Simple lib to test results or script runs from command line.

PyPI - Python Version PyPI version
Tests Codecov

Install

Install from pypi:

pip install cli_result

Or install from github repo:

pip install git+https://github.com/ayasyrev/cli_result.git

Usage.

Main purpose test results of examples run. We run all scripts in examples folder and compare results with expected results. Check it at different python versions.
So we can be sure that all scripts work and has similar behaviors in different python versions.
It's not suitable to run script that supposed to run for a long time or resources are limited.
But it's good for quick tests, to check configs and shorts demos (examples).

Put your script in examples folder and expected results in results folder.
Arguments for tests at file name same as script name + __args.txt.

from cli_result.core import check_examples, Cfg
result = check_examples()

This run all scripts in examples folder with arguments from __args.txt. file and compare with results at results/ folder.

assert result is None

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cli_result-0.1.tar.gz (9.5 kB view hashes)

Uploaded Source

Built Distribution

cli_result-0.1-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page