On this page
  1. unittest.skip
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

unittest.skip

Prev: unittest.removeResult | Up: unittest | Next: unittest.skipIf
Rel: unittest.addModuleCleanup, unittest.doModuleCleanups, unittest.enterModuleContext, unittest.expectedFailure
Ref: docs.python.org — unittest.skip
Tags: #public #python3 #stdlib #unittest


Import

import unittest
from unittest import skip

Signature & Overview

unittest.skip(reason)

Unconditionally skip a test.

Usage

import unittest

class Demo(unittest.TestCase):
    @unittest.skip("not implemented yet")
    def test_future(self) -> None:
        self.fail("should not run")

res = unittest.TestResult()
Demo("test_future").run(res)
assert len(res.skipped) == 1

Gotchas

REPL Inspect

from unittest import skip
help(skip)

Linked from

Related notes