Punic
Punic is a lightweight and user-friendly unit testing framework for Python. It provides an easy and efficient way to write and execute tests for your Python code.
Features
-
Easy Integration: Punic can be easily integrated into your Python projects.
-
Simple Assertion: The framework provides an
assert_method for making assertions on expected and actual values. -
Output Formatting: Test results are displayed in a clear and readable format.
-
Customizable: Punic is flexible and customizable to suit your specific requirements.
Getting Started
-
Install Punic:
pip install punictest -
Write your tests using the
assert_method:
from punic import Punic
p = Punic()
p.assert_(4, lambda: 2 + 2, "Addition")
- Run your test program.
Reference
The Punic class provides methods for defining and executing tests, configuring behavior, and callbacks:
assert_(assertion, function, named="Unnamed"): Defines a test case.
exit_on_failure(on_exit): Configures whether the program should exit on a test failure.
when_failed(action): Sets a callback function to be executed when a test case fails.
when_passed(action): Sets a callback function to be executed when a test case passes.
Contributions
Contributions to Punic are welcome! Please open an issue or submit a pull request for bug fixes, new features, or enhancements.
License
Punic is released under the MIT License. See the LICENSE file for more details.
Metadata
Release files for punictest 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| punictest-0.1.1.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| punictest-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.8 kB
Release files / punictest-0.1.1.tar.gz
| Download URL | punictest-0.1.1.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0706b413091ae80dd29cde40738a297e729163effb23669ae0418b2a015e17a1
|
|
BLAKE2b-256 checksum How to use checksums |
306814a2fcbcb30b97e198481244ea375e02514131866adf7aa7b69fd4fbc7f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / punictest-0.1.1-py3-none-any.whl
| Download URL | punictest-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c1b06f9ed56ae8d5eab308c37a04221b4e8c48d1e3a19908cb128a2a4b97a45
|
|
BLAKE2b-256 checksum How to use checksums |
0a32e1dc4f04552ad5cceb38b911a6c0d416a0ee5ee13390fc1c7723e8a852c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|