Introduction
The purpose of chaoflow.testing.crawler is to find tests in your package and run them along with tests in files you explicitly define.
Tests are found in the following files:
all .py files that are part of (subpackages of) your package, i.e. files that you can import with import
all .txt files that have a corresponding .py file
all files you excplicitly specify
All tests found can be run individually, e.g. with zc.recipe.testrunner.
Using the test crawler
In order to use the test crawler for your package, you only need to copy one file and declare the dependency on chaoflow.testing.crawler in your setup.py.
Drop this file into your package root and adapt the files list to explicitly specify test files that are not found otherwise, tests.py:
# chaoflow.testing.crawler.tests.py
#
# You can simply copy this file to your package and adjust it to your needs
from chaoflow.testing.crawler import create_test_suite
# File to test, relative to the package root
# all .py files are found
# all .txt files with corresponding .py file are found
files = [
'README.txt'
]
# We assume that this modules is in the root of your package
pkgname = __name__[:-6]
test_suite = create_test_suite(pkgname, files)
Declare the dependency in setup.py:
setup(...
extras_require={
'test': [
'interlude',
'chaoflow.testing.ipython',
'chaoflow.testing.crawler',
],
},
)
If interlude is available, interlude.interact will be available as interact in your test environment.
If chaoflow.testing.ipython is available, ipshell will be available as ipshell in your test environment.
example buildout.cfg using chaoflow.testing.crawler and zc.recipe.testrunner:
[buildout]
develop = .
parts = test py
[test]
recipe = zc.recipe.testrunner
eggs = chaoflow.testing.crawler [test]
[py]
recipe = zc.recipe.egg
interpreter = py
eggs = ${test:eggs}
After buildout, you can run your tests using ./bin/test. Run ./bin/test --list-tests to get a list of all registered tests and see ./bin/test --help for further information.
License
chaoflow.testing.crawler is licensed under LGPLv3. Please let me know if this presents a problem for you.
Changelog
Metadata
Release files for chaoflow.testing.crawler 0.5
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 |
|---|---|---|---|---|
| chaoflow.testing.crawler-0.5.zip | 37.2 kB | Without provenance | Details for chaoflow.testing.crawler-0.5.zip |
Release files / chaoflow.testing.crawler-0.5.zip
| Download URL | chaoflow.testing.crawler-0.5.zip |
|---|---|
| Size | 37.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9880738483b8f8da86a1015215bcdf806679c70f5eb30b2cdc1be9a03b9004e0
|
|
BLAKE2b-256 checksum How to use checksums |
466881813c411eb4e40359b9dfd01b0e334f72a259911a370d229d2132f76c62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for chaoflow.testing.crawler 0.5
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.