mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 06:20:08 +01:00
fix gitlab #14 - parse tool.bumpver when using pyproject.toml
This commit is contained in:
parent
2336bc7ca0
commit
15c7ea00df
4 changed files with 34 additions and 8 deletions
2
test/fixtures/project_c/pyproject.toml
vendored
2
test/fixtures/project_c/pyproject.toml
vendored
|
|
@ -1,4 +1,4 @@
|
|||
[bumpver]
|
||||
[tool.bumpver]
|
||||
current_version = "v2017q1.54321"
|
||||
version_pattern = "v{year}q{quarter}.{build_no}"
|
||||
commit = true
|
||||
|
|
|
|||
|
|
@ -299,7 +299,9 @@ def test_novcs_nocfg_init(runner, caplog):
|
|||
with pl.Path("bumpver.toml").open(mode="r", encoding="utf-8") as fobj:
|
||||
cfg_content = fobj.read()
|
||||
|
||||
base_str = config.DEFAULT_TOML_BASE_TMPL.format(initial_version=config._initial_version())
|
||||
base_str = config.DEFAULT_BUMPVER_TOML_BASE_TMPL.format(
|
||||
initial_version=config._initial_version()
|
||||
)
|
||||
assert base_str in cfg_content
|
||||
assert config.DEFAULT_TOML_README_MD_STR in cfg_content
|
||||
|
||||
|
|
@ -348,7 +350,9 @@ def test_novcs_pyproject_init(runner, caplog):
|
|||
with pl.Path("pyproject.toml").open(mode="r", encoding="utf-8") as fobj:
|
||||
cfg_content = fobj.read()
|
||||
|
||||
base_str = config.DEFAULT_TOML_BASE_TMPL.format(initial_version=config._initial_version())
|
||||
base_str = config.DEFAULT_PYPROJECT_TOML_BASE_TMPL.format(
|
||||
initial_version=config._initial_version()
|
||||
)
|
||||
assert base_str in cfg_content
|
||||
assert config.DEFAULT_TOML_README_MD_STR in cfg_content
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue