mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 14:30:09 +01:00
py27 compat fixes
This commit is contained in:
parent
31ae8c21f4
commit
6955728080
3 changed files with 4 additions and 3 deletions
|
|
@ -36,7 +36,7 @@ def parse_buffer(cfg_buffer: io.StringIO) -> MaybeConfig:
|
||||||
cfg_parser = configparser.RawConfigParser()
|
cfg_parser = configparser.RawConfigParser()
|
||||||
cfg_parser.readfp(cfg_buffer)
|
cfg_parser.readfp(cfg_buffer)
|
||||||
|
|
||||||
if "pycalver" not in cfg_parser:
|
if not cfg_parser.has_section("pycalver"):
|
||||||
log.error("setup.cfg does not contain a [pycalver] section.")
|
log.error("setup.cfg does not contain a [pycalver] section.")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ def test_parse(tmpdir):
|
||||||
setup_path = tmpdir.mkdir("minimal").join("setup.cfg")
|
setup_path = tmpdir.mkdir("minimal").join("setup.cfg")
|
||||||
setup_path.write("\n".join((
|
setup_path.write("\n".join((
|
||||||
"[pycalver]",
|
"[pycalver]",
|
||||||
f"current_version = v201808.0001-dev",
|
"current_version = v201808.0001-dev",
|
||||||
"commit = False",
|
"commit = False",
|
||||||
"tag = False",
|
"tag = False",
|
||||||
"",
|
"",
|
||||||
|
|
@ -78,7 +78,7 @@ def test_parse_invalid_version(tmpdir):
|
||||||
setup_path = tmpdir.mkdir("fail").join("setup.cfg")
|
setup_path = tmpdir.mkdir("fail").join("setup.cfg")
|
||||||
setup_path.write("\n".join((
|
setup_path.write("\n".join((
|
||||||
"[pycalver]",
|
"[pycalver]",
|
||||||
f"current_version = 0.1.0",
|
"current_version = 0.1.0",
|
||||||
"commit = False",
|
"commit = False",
|
||||||
)))
|
)))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# minimal test requirements for py27 testing
|
# minimal test requirements for py27 testing
|
||||||
|
python -m pip install -U pip
|
||||||
python -m pip install pytest rst2html5
|
python -m pip install pytest rst2html5
|
||||||
|
|
||||||
rst2html5 --strict README.rst > /dev/null
|
rst2html5 --strict README.rst > /dev/null
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue