A nose plugin to improve nose test description output. This plugin deals with two problems in the default verbose nose output. Finding out which test failed, and selectively rerunning tests.
By default, running nosetests verbosely will describe each test with one of
An id derived from the name and module of the test
The first line of the docstring
thus:
I have a docstring ... ok test_with_blank_docstring (meta_tests.MetaTest) ... ok I have a docstring ... ok test_without_docstring (meta_tests.MetaTest) ... ok
If you have multiple tests in different suites with the same or similar docstrings, and one of them fails, it can be difficult to find out which is which.
The description derived from the name of the test is also frustrating. The format of a command line argument to run a specific test in nose is module:TestClass.testmethod, yet the format of the description is testmethod (module.TestClass), meaning that the user must construct this argument by copying the various sections into the right place and replacing one of the dots with a colon.
Usage
nosetests --verbose --with-enhanced-descriptions
meta_tests:MetaTest.test_docstring_leading_line
(The first line was empty, but this is the line to use.) ... ok
meta_tests:MetaTest.test_with_blank_docstring ... ok
meta_tests:MetaTest.test_with_docstring
(I have a docstring) ... ok
meta_tests:MetaTest.test_without_docstring ... ok
The reader can see both the identifier (so that they know exactly which test fails), and the documentation (so that they know what it was supposed to do). The test identifiers can alo now be copied and run, e.g. nosetests meta_tests:MetaTest.test_without_docstring.
Installation
pip install nose_enhanced_descriptions
Licence
MIT
Metadata
Release files for nose-enhanced-descriptions 0.1.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 | |
|---|---|---|---|---|
| nose-enhanced-descriptions-0.1.5.tar.gz | 3.1 kB | Without provenance | Details |
Release files / nose-enhanced-descriptions-0.1.5.tar.gz
| Download URL | nose-enhanced-descriptions-0.1.5.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df5838f99be630c2972f9d800a4fbde9428dfc3aba4dd7c856367d697e91c3cc
|
|
BLAKE2b-256 checksum How to use checksums |
2d5de41fd4067b2f5e7d285593045c0d36f83a401918e2f29f93f607462dc453
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for nose-enhanced-descriptions 0.1.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.