mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 14:30:09 +01:00
formatting updates
This commit is contained in:
parent
3385f2d675
commit
1129de0beb
11 changed files with 153 additions and 128 deletions
|
|
@ -23,16 +23,20 @@ def test_parse_default_config():
|
|||
|
||||
def test_parse(tmpdir):
|
||||
setup_path = tmpdir.mkdir("minimal").join("setup.cfg")
|
||||
setup_path.write("\n".join((
|
||||
"[pycalver]",
|
||||
"current_version = v201808.0001-dev",
|
||||
"commit = False",
|
||||
"tag = False",
|
||||
"",
|
||||
"[pycalver:file:setup.cfg]",
|
||||
"patterns = ",
|
||||
" current_version = {version}",
|
||||
)))
|
||||
setup_path.write(
|
||||
"\n".join(
|
||||
(
|
||||
"[pycalver]",
|
||||
"current_version = v201808.0001-dev",
|
||||
"commit = False",
|
||||
"tag = False",
|
||||
"",
|
||||
"[pycalver:file:setup.cfg]",
|
||||
"patterns = ",
|
||||
" current_version = {version}",
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
cfg = config.parse(str(setup_path))
|
||||
|
||||
|
|
@ -64,11 +68,15 @@ def test_parse_empty_config(tmpdir):
|
|||
|
||||
def test_parse_missing_version(tmpdir):
|
||||
setup_path = tmpdir.mkdir("fail").join("setup.cfg")
|
||||
setup_path.write("\n".join((
|
||||
"[pycalver]",
|
||||
# f"current_version = v201808.0001-dev",
|
||||
"commit = False",
|
||||
)))
|
||||
setup_path.write(
|
||||
"\n".join(
|
||||
(
|
||||
"[pycalver]",
|
||||
# f"current_version = v201808.0001-dev",
|
||||
"commit = False",
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
cfg = config.parse(str(setup_path))
|
||||
assert cfg is None
|
||||
|
|
@ -76,11 +84,7 @@ def test_parse_missing_version(tmpdir):
|
|||
|
||||
def test_parse_invalid_version(tmpdir):
|
||||
setup_path = tmpdir.mkdir("fail").join("setup.cfg")
|
||||
setup_path.write("\n".join((
|
||||
"[pycalver]",
|
||||
"current_version = 0.1.0",
|
||||
"commit = False",
|
||||
)))
|
||||
setup_path.write("\n".join(("[pycalver]", "current_version = 0.1.0", "commit = False")))
|
||||
|
||||
cfg = config.parse(str(setup_path))
|
||||
assert cfg is None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue