Skip to main content

Really terse output from your nose tests. Just the bare essentials.

Nose-terse-output is inspired by nose-machineout. It’s a reporter plugin to nose that doesn’t produce any output if a nose test run is successful, and only produce one line per error in a format that is easily parseable by editors, like VIM.

Nose’s error messages are really hard for tools, like text editors, to parse in order to navigate to the location of the error. nose-terse-output takes that output and parses it to produce one line of information per failed test. That line has the format:

<path>:<line>: <error message>

That’s a whole lot easier for a text editor to parse.

nose-terse-output accomplishes this by starting at the bottom of the call stack for the error, and walk upwards until it finds the first location that looks interesting.

By default, the first stack frame that comes from the same basepath as the current directory and that doesn’t match ‘python’ or ‘venv’ will be selected as the location of the failing test.

You can change the patterns of paths to ignore when walking the stack with the –terse-ignore argument. You can use –terse-ignore several times. You can also tell nose-terse-output that it’s ok to consider non local directories by using the –terse-outside-local argument.

Default output from a failing test run:

$ nosetests --with-terseout
path/to/test.py:123: test name: 'foo' != 'bar'

To get a compact print out of the stack as well:

$ nosetests --with-terseout --terse-stack

To supply your own directories you’d like to ignore:

$ nosetests --with-terseout --terse-ignore="venv" --terse-ignore="helpers"

To consider non-local directories:

$ nosetests --with-terseout --terse-outside-local

Install with:

$ pip install nose-terse-output

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nose-terse-output-1.0.1.zip (6.5 kB view details)

Uploaded Source

File details

Details for the file nose-terse-output-1.0.1.zip.

File metadata

File hashes

Hashes for nose-terse-output-1.0.1.zip
Algorithm Hash digest
SHA256 e94a1c2c2054cf71e3cc8c8f3e8d55622991ee710315f5fdf87ebc602a372446
MD5 40d676109ea732ca5f6ba393a3d32cea
BLAKE2b-256 9f21046fd7619904a50c5fe34abc6b2591f4152d2c93a0d4bc52806ac8f212e9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page