pytest-travis-fold
Pytest plugin that folds captured output sections in Travis CI build log.
In addition, pytest-travis-fold recognizes presence of the pytest-cov plugin and folds coverage reports accordingly.
Installation and Usage
Just install the pytest-travis-fold package as part of your build.
When using tox, add the package to the deps list in your tox.ini and make sure the TRAVIS environment variable is passed:
[testenv]
deps =
pytest-travis-fold
passenv = TRAVIS
If you don’t use tox and invoke py.test directly from .travis.yml, you may install the package as an additional install step:
install: - pip install -e . - pip install pytest-travis-fold script: py.test
Output folding is enabled automatically when running inside Travis CI. It is OK to have the plugin installed also in your dev environment: it is only activated by checking the presence of the TRAVIS environmental variable, unless the --travis-fold command line switch is used.
The travis fixture
The plugin by itself only makes the captured output sections appear folded. If you wish to make the same thing with arbitrary lines, you can do it manually by using the travis fixture.
It is possible to fold the output of a certain code block using the travis.folding_output() context manager:
def test_something(travis):
with travis.folding_output():
print('Lines, lines, lines...')
print('Lots of them!')
...
Or you may want to use lower-level travis.fold_string() and travis.fold_lines() functions and then output the result as usual.
Contributing
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
License
Distributed under the terms of the MIT license, “pytest-travis-fold” is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
Metadata
Release files for pytest-travis-fold 1.3.0
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 |
|---|---|---|---|---|
| pytest-travis-fold-1.3.0.tar.gz | 5.4 kB | Without provenance | Details for pytest-travis-fold-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_travis_fold-1.3.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for pytest_travis_fold-1.3.0-py2.py3-none-any.whl |
Total release size: 13.3 kB
Release files / pytest-travis-fold-1.3.0.tar.gz
| Download URL | pytest-travis-fold-1.3.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5607df571232b257be644400be559afb9148af3a27576f8080f56cee915771b2
|
|
BLAKE2b-256 checksum How to use checksums |
bd921c808180309b97f54da216875c4f4a5504a6282c84176d1120647de68267
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pytest_travis_fold-1.3.0-py2.py3-none-any.whl
| Download URL | pytest_travis_fold-1.3.0-py2.py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3fe15aa21ed14275e5a77814339281b3b618e350b98a43e7ac5d5bdcad8202cb
|
|
BLAKE2b-256 checksum How to use checksums |
70316735482529a3bdab04790c6573f7d3cb0184967786302dc7c82b9d711e2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pytest-travis-fold 1.3.0
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.