NOSE2(1)

πŸ“¦ version 0.16.0, in epel 10, epel 9, fedora 43, fedora 44

πŸ’… NOSE2 β€” the manual, but make it cute

okay so bestie, welcome to nose2 (that's NOSE2(1) in manual-speak, and yes she's a User Command, very demure, very Unix). She's the successor to nose, built on top of unittest2, and she's about to run your tests like the main character she is. ✨


🌸 NAME 🌸

nose2 β€” the successor to nose, based on unittest2. she's the glow-up, fr fr.


πŸ¦‹ SYNOPSIS πŸ¦‹

nose2 [-s START_DIR] [-t TOP_LEVEL_DIRECTORY] [--config [CONFIG]]
[--no-user-config] [--no-plugins] [--plugin PLUGINS] [--exclude-
plugin EXCLUDE_PLUGINS] [--verbosity VERBOSITY] [--verbose] [--quiet]
[--log-level LOG_LEVEL] [-B] [--coverage PATH] [--coverage-report TYPE]
[--coverage-config FILE] [-C] [-D] [-F] [--log-capture]
[--pretty-assert] [-h] [testNames ...]

like, that's a lot of flags, but don't panic, we're gonna go through every single one. no skipping. πŸ’–


✨ OPTIONS ✨

πŸŽ€ POSITIONAL ARGUMENTS

  • testNames β€” the tests you wanna run, bestie. name them and she'll find them.

πŸ’œ OPTIONAL ARGUMENTS

  • -s START_DIR, --start-dir START_DIR β€” where she starts looking for tests. default is . (aka right here, right now, in your current directory).
  • -t TOP_LEVEL_DIRECTORY, --top-level-directory TOP_LEVEL_DIRECTORY, --project-directory TOP_LEVEL_DIRECTORY β€” the top level directory of your project. if you don't say anything, she just defaults to the start dir. lowkey convenient.
  • --config [CONFIG], -c [CONFIG] β€” config files to load, if they exist (key phrase, she's not gonna invent them). the default ones are unittest.cfg and nose2.cfg in the start directory.
  • --no-user-config β€” do not load user config files. your own personal config stays out of it.
  • --no-plugins β€” do not load any plugins.
⚠️ warning bestie: nose2 does not do anything if no plugins are loaded. like, anything. she's just standing there. πŸ’€
  • --plugin PLUGINS β€” load this plugin module.
  • --exclude-plugin EXCLUDE_PLUGINS β€” do not load this plugin module. (the opposite vibe of the one above, iconic)
  • --verbosity VERBOSITY β€” set the starting verbosity level (it's an int, okay?). this applies before -v and -q get their say.
  • --verbose, -v β€” print test case names and statuses. stack multiple -v's for higher verbosity. go off, add like five.
  • --quiet, -q β€” reduce verbosity. multiple -q's result in lower verbosity. shhh 🀫
  • --log-level LOG_LEVEL β€” set the logging level for messages logged to console.
  • -h, --help β€” show a help message and exit. the classic. the goat. 🐐

🌈 PLUGIN ARGUMENTS

command-line arguments added by plugins, because the plugins said "not me contributing extra flags" πŸ’…:

  • -B, --output-buffer β€” enable output buffer.
  • --coverage PATH β€” measure coverage for a filesystem path. multi-allowed, so you can pass it more than once, queen.
  • --coverage-report TYPE β€” generate selected reports. available types: term, term-missing, annotate, html, xml. also multi-allowed. pick your faves.
  • --coverage-config FILE β€” config file for coverage, default: .coveragerc.
  • -C, --with-coverage β€” turn on coverage reporting.
  • -D, --debugger β€” enter pdb on test fail or error. she's gonna let you poke around in there πŸ”₯
  • -F, --fail-fast β€” stop the test run after the first error or failure. no dragging it out.
  • --log-capture β€” enable log capture.
  • --pretty-assert β€” add pretty output for "assert" statements. your tracebacks but ✨aesthetic✨.

πŸ“ FILES πŸ“

  • unittest.cfg and nose2.cfg β€” default config files, loaded from the start directory. see --config/-c, --start-dir/-s, and --no-user-config if you wanna know more about how she finds them.
  • .coveragerc β€” default config file for coverage. see --coverage-config.

ngl bestie, if you got all the way down here you're literally a Unix icon. 🫢

and that's the whole page, no cap. this manual came from the nose2 docs, dated June 2022 β€” go forth and test, you gorgeous genius. πŸ‘‘

πŸ“¦ where this page comes from