Pytest Feature

Adds the pytest testing framework to your project.

Usage

To use the Pytest Feature, make sure your Projectfile contains the following:

from medikit import require

pytest = require('pytest')

The pytest handle is a PytestConfig instance, and can be used to customize the feature.

Configuration

class medikit.feature.pytest.PytestConfig[source]
addons = {'coverage': '~=4.5', 'pytest-cov': '~=2.7'}

Additionnal packages to use in dev requirements along with the main pytest packe. You can override this dictionnary.

set_version(version)[source]

Overrides Pytest version requirement with your own.

version = '~=4.6'

Pytest version to use in dev requirements. You can override this using set_version(…).

Implementation

class medikit.feature.pytest.PytestFeature(dispatcher)[source]
Config

alias of PytestConfig

on_make_generate(event)[source]

Listens to medikit.feature.make.on_generate event (priority: -20)

on_python_generate(event)[source]

Listens to medikit.feature.python.on_generate event (priority: 0)

on_start(event)[source]

Listens to medikit.on_start event (priority: -20)

requires = {'python'}