NOSE2(1)
π 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 areunittest.cfgandnose2.cfgin 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-vand-qget 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β enterpdbon 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.cfgandnose2.cfgβ default config files, loaded from the start directory. see--config/-c,--start-dir/-s, and--no-user-configif 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
- epel 10: python3-nose2 0.15.1-5.el10_0 Β· BSD-2-Clause AND BSD-3-Clause
- epel 9: python3-nose2 0.11.0-8.el9 Β· BSD
- fedora 43: python3-nose2 0.15.1-16.fc43 Β· BSD-2-Clause AND BSD-3-Clause
- fedora 44: python3-nose2 0.16.0-1.fc44 Β· BSD-2-Clause AND BSD-3-Clause
- fedora 44: python3-nose2 0.16.0-3.fc44 Β· BSD-2-Clause AND BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms