Skip to content

Dont-Import-Test-Modules

Documentation Index

Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt

Use this file to discover all available pages before exploring further.

Sourcery rule id: dont-import-test-modules

Section titled “Sourcery rule id: dont-import-test-modules”

Don’t import test modules.

import test.unit.test_something

Don’t import test modules.

Tests should be self-contained and don’t depend on each other.

If a helper function is used by multiple tests, define it in a helper module, instead of importing one test from the other.