testing
Configuration for testing and code formatting tools.
Classes:
|
Generates the |
Functions:
|
Ensure |
|
Add configuration for |
|
Remove the |
|
Add configuration for |
|
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.
get_setenv([prefer_binary, setuptools_stdlib])Return environment variables to be set in the testenv.
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:.package].[testenv:build].[testenv:coverage].[testenv:docs].[testenv:lint].[testenv:mypy].[testenv:perflint].[testenv:py312-dev].[testenv:pyup].tox()[tox].-
get_setenv(prefer_binary=True, setuptools_stdlib=True)[source] Return environment variables to be set in the testenv.
-
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.- Parameters
repo_path (
Path) – Path to the repository root.templates (
Environment)
- Return type
-
make_formate_toml(repo_path, templates)[source] Add configuration for
formate.https://formate.readthedocs.io
- Parameters
repo_path (
Path) – Path to the repository root.templates (
Environment)
- Return type
-
make_isort(repo_path, templates)[source] Remove the
isortconfiguration file.https://github.com/timothycrosley/isort
- Parameters
repo_path (
Path) – Path to the repository root.templates (
Environment)
- Return type
-
make_justfile(repo_path, templates)[source] Add configuration for
just.- Parameters
repo_path (
Path) – Path to the repository root.templates (
Environment)
- Return type
-
make_tox(repo_path, templates)[source] Add configuration for
Tox.- Parameters
repo_path (
Path) – Path to the repository root.templates (
Environment)
- Return type
-
make_yapf(repo_path, templates)[source] Add configuration for
yapf.https://github.com/google/yapf
- Parameters
repo_path (
Path) – Path to the repository root.templates (
Environment)
- Return type