Plugin Configuration Options

Attention

Directory traversal is not allowed for path parameters! Also, paths should be relative. They get evaluated relative to the rootdir determined by pytest.

The following options can be set in the Pytest configuration file.

pm-mismatch-style
Choice:

full, diff

Default:

full

In case of expected output mismatch, specifies how to report a test failure:

  • full – shows actual and expected separately (default).

  • diff – shows a unified diff between actual and expected text.

pm-pattern-file-fmt
Default:

{module}/{class}/{fn}{callspec}{suffix}

Expectations filename pattern format. It can have the following placeholders:

  • {module} for the test module name.

  • {class} for the test class name.

  • {fn} for the test function name.

  • {callspec} for the parameterized part of the test function.

  • {suffix} for the optional suffix added by the expect_suffix() mark.

Note that for non-class test functions, the {class} placeholder part will be empty. For parametrized tests, the {callspec} placeholder containing %XX-escaped information about the parametrization is added.

pm-patterns-base-dir
Default:

test/data/expected

The base directory is used to place expectations/pattern files. Given directory must be relative to the project’s root.