checks.test_suite.TestSuiteCheck

checks.test_suite.TestSuiteCheck()

Check that the project has a test suite.

Looks for test directories and test files and reports where they are. The check is about presence only: it does not run the tests, and it does not read what they cover. The tests check runs them.

Attributes

name :

The check identifier (“test_suite”).

description :

Human-readable description of this check.

rules :

The codes this check can report.

hints :

What to do about each code.

Examples

>>> from pathlib import Path
>>> check = TestSuiteCheck()
>>> check.name
'test_suite'
>>> result = check.run(Path("."), {})

Methods

Name Description
run Look for the project’s tests.

run

checks.test_suite.TestSuiteCheck.run(package_path, config)

Look for the project’s tests.

Parameters

package_path : Path

Path to the package directory to check.

config : dict[str, Any]

Configuration dictionary for this check.

Returns

: CheckResult

A CheckResult with:

: CheckResult
  • OK status if tests are found, with their place in the details
: CheckResult
  • WARNING status if no tests are found