---
name: "unit2"
section: "1"
platform: "linux"
package: "python-unittest2"
version: "1.1.0-6.1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/unit2"
---

# unit2(1)

a shorthand for python -m unittest2

## NAME

unit2 - a shorthand for python -m unittest2

## SYNOPSIS

**unit2** \[ **-h** \] \[ **-v** \] \[ **-q** \] \[ **-f** \] \[ **-c** \] \[ **-b** \] \[ *tests \[tests ...\]* \]

## DESCRIPTION

The unit2 script is a convenient shortcut for discovering and running tests in a given body of Python source code.

## COMMAND LINE OPTIONS

- **-h , --help**

  show this help message and exit

- **-v , --verbose**

  Verbose output

- **-q , --quiet**

  Quiet output

- **-f , --failfast**

  Stop on first fail or error

- **-c , --catch**

  Catch ctrl-C and display results so far

- **-b, --buffer**

  Buffer stdout and stderr during tests

## EXAMPLES

- **unit2 test\_module**

  run tests from *test\_module*

- **unit2 module.TestClass**

  run tests from *module.TestClass*

- **unit2 module.Class.test\_method**

  run specified test method

## AUTHOR

This manual page was written for Debian by Zygmunt Krynicki
