testing¶
Configuration for testing and code formatting tools.
Classes:
|
Generates the |
Functions:
|
Ensure |
|
Add configuration for |
|
Remove the |
|
Add configuration for |
|
Add configuration for |
-
class
ToxConfig(repo_path, templates)[source]¶ Bases:
IniConfiguratorGenerates the
tox.iniconfiguration file.- Parameters
repo_path (
Path) – Path to the repository root.templates (
Environment)
Methods:
__getitem__(item)Passthrough to
templates.globals.[check-wheel-contents].[coverage:report].[coverage:run].envlists()[envlists].flake8()[flake8].Compile the list of mypy commands.
Compile the list of mypy dependencies.
Compile the list of source files.
Returns information about the matrix of third party versions.
merge_existing(ini_file)Merge existing sections in the configuration file into the new configuration.
pytest()[pytest].testenv()[testenv].[testenv:build].[testenv:coverage].[testenv:docs].[testenv:lint].[testenv:mypy].[testenv:pyup].tox()[tox].-
get_third_party_version_matrix()[source]¶ Returns information about the matrix of third party versions.
The returned object is a three-element tuple, comprising:
The name of the third party library.
A list of version strings.
The testenv suffix, e.g.
-attrs{19.3,20.1}.
- Return type
Tuple[str,DelimitedList,str]
-
ensure_tests_requirements(repo_path, templates)[source]¶ Ensure
tests/requirements.txtcontains the required entries.