class documentation
class VerifyPyprojectDotTomlTests(TestCase):
Test the `_load_pyproject_toml` helper function
Method | test_broken |
Syntactially invalid TOML produces an exception. The specific exception varies by the underlying TOML library. |
Method | test_file |
An absent ``pyproject.toml`` file produces no result unless there is opt-in. |
Method | test_name |
`TypeError` is raised when the project name isn't a string. |
Method | test_name |
`ValueError` is raised when we can't extract the project name. |
Method | test_no |
The ``[tool.incremental]`` table is not strictly required, but its ``opt_in=False`` indicates its absence. |
Method | test_package |
Raise `ValueError` when the package root can't be resolved. |
Method | test_setuptools |
The package has opted-in to Incremental version management when the ``[tool.incremental]`` section is a dict. The project name is taken from ``[tool.incremental] name`` or ``[project] name``. |
Method | test_tool |
`ValueError` is raised when the ``[tool]`` or ``[tool.incremental]`` isn't a table. |
Method | test_tool |
Raise `ValueError` when the ``[tool.incremental]`` section contains keys other than ``"name"`` |
Method | _load |
Read a TOML snipped from a temporary file with `_load_pyproject_toml` |
Syntactially invalid TOML produces an exception. The specific exception varies by the underlying TOML library.
The ``[tool.incremental]`` table is not strictly required, but its ``opt_in=False`` indicates its absence.
The package has opted-in to Incremental version management when the ``[tool.incremental]`` section is a dict. The project name is taken from ``[tool.incremental] name`` or ``[project] name``.
Read a TOML snipped from a temporary file with `_load_pyproject_toml`
Parameters | |
toml:str | TOML content of the temporary file |
path:Path | str | None | Path to which the TOML is written |
Returns | |
_IncrementalConfig | None | Undocumented |