Skip to main content

Very simple testing framework suitable for beginner programmers, with easy functions for accomplishing most common testing tasks like providing input. Use with Python >=3.9 for best results, but it should be compatible with Python >=3.6.

Project description

optimism

A very small & simple unit-testing framework designed to provide all the basic necessities to beginner programmers as simply as possible.

Designed by Peter Mawhorter.

Dependencies

Works on Python versions 3.8 and up, with 3.9+ recommended.

Installing

To install from PyPI, run the following command on the command-line:

python3 -m pip install optimism

Once it's installed, you can run the tests using:

TODO

Usage

Use the testCase function to establish an expression as a test case. Then use the expectResult, expectOutputContains, and/or expectCustom functions to establish expectations for that test. Use provideInput and/or captureOutput and related functions to deal with input/output testing. Use runFile to create a test for an entire file.

See the documentation for more details on how to use it and what each function does.

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

optimism-0.14.tar.gz (20.8 kB view hashes)

Uploaded Source

Built Distribution

optimism-0.14-py3-none-any.whl (20.9 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