tests.test_testing moduleΒΆ
Test the testing utilities and the simulation of CLI execution.
- tests.test_testing.test_real_fs()[source]ΒΆ
Check a simple test is not caught into the CLI runner fixture which is encapsulating all filesystem access into temporary directory structure.
- tests.test_testing.test_temporary_fs(runner)[source]ΒΆ
Check the CLI runner fixture properly encapsulated the filesystem in temporary directory.
- tests.test_testing.test_invoke_force_color(invoke)[source]ΒΆ
Test colors are preserved while invoking, and forced to be rendered on Windows.
- tests.test_testing.test_invoke_force_color_contradicting_color_raises()[source]ΒΆ
Asking for forced colors and stripped ones at once is refused.
- tests.test_testing.test_invoke_catch_exceptions_follows_the_runner(runner_catches, invoke_catches, propagates)[source]ΒΆ
invoke()falls back to the runnerβs owncatch_exceptionssetting.
- tests.test_testing.test_command_default_color()[source]ΒΆ
With @command and no color env var, Context and ColorOption resolve the GNU auto default (ctx.color=None), yet a forced runner still renders ANSI codes.
- tests.test_testing.test_command_no_color_flag()[source]ΒΆ
Invoke with βno-color. Verify ctx.color=False and ANSI stripped from echo output.
- tests.test_testing.test_force_color_attribute()[source]ΒΆ
CliRunner.force_color=True applies
force_colorto every run.
- tests.test_testing.test_no_color_envvar()[source]ΒΆ
NO_COLOR=1 env var causes ctx.color=False via ColorOption.
- tests.test_testing.test_force_color_envvar()[source]ΒΆ
FORCE_COLOR=1 env var keeps ctx.color=True via ColorOption.