quicktests
A library for python for easy testing.
Example
Example 1: TestBase
from quicktests import print_report, TestBase
class Test(TestBase):
def test_one_equals_one(self):
assert 1 == 1, "One does not equal one"
def test_one_equals_one_str(self):
assert "One" == "One", "\"One\" does not equal \"One\""
if __name__ == '__main__':
print_report(Test())
The code above provides the following information:
Ran 2 tests.
Running tests took 4.887580871582031e-05 seconds.
No failed tests.
No errors were found. Add more code to verify your code is working.
Example 2: MiniTest
from quicktests import print_report, MiniTest
if __name__ == '__main__':
def complex_test():
return False
print_report(
MiniTest(
test_true=[
lambda: True,
"Returns True"
],
test_false=[
lambda: False,
"Returns False"
],
test_error=[
lambda: 1 / 0,
"This is wrong"
],
test_complex=[
complex_test,
"This is complex"
],
test_with_really_long_name=[
lambda: False,
"This is a long name",
]
)
)
The code above provides the following information:
Ran 5 tests.
Running tests took 4.076957702636719e-05 seconds.
4 failed tests:
1. test 'complex': <class 'AssertionError'> -> This is complex
2. test 'error': <class 'ZeroDivisionError'> -> division by zero
3. test 'false': <class 'AssertionError'> -> Returns False
5. test 'with really long name': <class 'AssertionError'> -> This is a long name
Metadata
Release files for quicktests 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quicktests-0.0.4.tar.gz | 2.6 kB | Without provenance | Details for quicktests-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quicktests-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for quicktests-0.0.4-py3-none-any.whl |
Total release size: 18.4 kB
Release files / quicktests-0.0.4.tar.gz
| Download URL | quicktests-0.0.4.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49e40555425a17c3288858311544e4e70e99c5d734e66d96e1be9741e374eaf3
|
|
BLAKE2b-256 checksum How to use checksums |
553af4c4fc510d2a2381f16e319f872cd1c51babfe56e82e6b42bcdf50434c6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9
|
Release files / quicktests-0.0.4-py3-none-any.whl
| Download URL | quicktests-0.0.4-py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ffbf787e87958e13b8ba8275d63db699df54953fac42d71cdf478b7ffaa07417
|
|
BLAKE2b-256 checksum How to use checksums |
ea919130589c7933b2fd3c6973fcbeb1b231b70e31a546e9991adbe31886da84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9
|
Security for quicktests 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.