diff --git a/README.md b/README.md index ebfebdb..6aa9bf0 100644 --- a/README.md +++ b/README.md @@ -35,11 +35,6 @@ Code Quality/CI: [![Code Style: sjfmt][img_style]][url_style] -| Name | role | since | until | -|-------------------------------------|-------------------|---------|-------| -| Manuel Barkhau (mbarkhau@gmail.com) | author/maintainer | 2018-09 | - | - - [img_github_build]: https://github.com/mbarkhau/pycalver/workflows/CI/badge.svg [url_github_build]: https://github.com/mbarkhau/pycalver/actions?query=workflow%3ACI @@ -395,7 +390,7 @@ PEP440 : 2020.1052 ### Explicit `--set-version` -If the various automatic version incrementing methods don't work for you, you can explicitly do `--set-version=`. +If the various automatic version incrementing methods don't work for you, you can explicitly do `--set-version=`. ```diff $ bumpver update --dry --set-version="v2020.1060" @@ -1004,3 +999,9 @@ INFO - git commit --message 'bump version to 2020.1006' INFO - git tag --annotate 2020.1006 --message 2020.1006 INFO - git push origin --follow-tags 2020.1006 HEAD ``` + +## Contributors + +| Name | role | since | until | +|-------------------------------------|-------------------|---------|-------| +| Manuel Barkhau (mbarkhau@gmail.com) | author/maintainer | 2018-09 | - | diff --git a/src/bumpver/cli.py b/src/bumpver/cli.py index f3df193..8f7255d 100755 --- a/src/bumpver/cli.py +++ b/src/bumpver/cli.py @@ -241,7 +241,7 @@ def version_options(function: typ.Callable) -> typ.Callable: @click.help_option() @verbose_option def cli(verbose: int = 0) -> None: - """Automatically update CalVer version strings in plaintext files.""" + """Automatically update version strings in plaintext files.""" if verbose: _configure_logging(verbose=max(_VERBOSE, verbose)) diff --git a/test/test_cli.py b/test/test_cli.py index 19e2ce1..701c002 100644 --- a/test/test_cli.py +++ b/test/test_cli.py @@ -101,7 +101,6 @@ def runner(tmpdir): def test_help(runner): result = runner.invoke(cli.cli, ['--help', "-vv"]) assert result.exit_code == 0 - assert "CalVer" in result.output assert "update " in result.output assert "test " in result.output assert "init " in result.output @@ -927,32 +926,7 @@ README.* = """ -def test_multimatch_file_patterns_v1(runner): - _add_project_files("README.md") - with pl.Path("setup.cfg").open(mode="w", encoding="utf-8") as fobj: - fobj.write(SETUP_CFG_MULTIMATCH_FILE_PATTERNS_FIXTURE_V1) - - with pl.Path("README.md").open(mode="r", encoding="utf-8") as fobj: - content = fobj.read() - - assert content.count("Hello World v201707.1002-alpha !") == 1 - assert content.count("Hello World v202011.1003-beta !") == 0 - assert content.count("[aka. 201707.1002a0 !]") == 1 - assert content.count("[aka. 202011.1003b0 !]") == 0 - - result = runner.invoke(cli.cli, ['update', '--tag', 'beta', '--date', "2020-11-22"]) - assert result.exit_code == 0 - - with pl.Path("README.md").open(mode="r", encoding="utf-8") as fobj: - content = fobj.read() - - assert content.count("Hello World v201707.1002-alpha !") == 0 - assert content.count("Hello World v202011.1003-beta !") == 1 - assert content.count("[aka. 201707.1002a0 !]") == 0 - assert content.count("[aka. 202011.1003b0 !]") == 1 - - -SETUP_CFG_MULTIMATCH_FILE_PATTERNS_FIXTURE_v2 = r""" +SETUP_CFG_MULTIMATCH_FILE_PATTERNS_FIXTURE_V2 = r""" [bumpver] current_version = "v201701.1002-alpha" version_pattern = "vYYYY0M.BUILD[-TAG][NUM]" @@ -967,10 +941,14 @@ README.* = """ -def test_multimatch_file_patterns_v2(runner): +@pytest.mark.parametrize( + "config_text", + [SETUP_CFG_MULTIMATCH_FILE_PATTERNS_FIXTURE_V1, SETUP_CFG_MULTIMATCH_FILE_PATTERNS_FIXTURE_V2], +) +def test_multimatch_file_patterns(config_text, runner): _add_project_files("README.md") with pl.Path("setup.cfg").open(mode="w", encoding="utf-8") as fobj: - fobj.write(SETUP_CFG_MULTIMATCH_FILE_PATTERNS_FIXTURE_v2) + fobj.write(config_text) with pl.Path("README.md").open(mode="r", encoding="utf-8") as fobj: content = fobj.read()