Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@tomschr
Copy link
Member

@tomschr tomschr commented Apr 26, 2020

This PR fixes #244 and contains the following changes:

The VersionInfo.compare method allows already VersionInfo, dict, tuple/list and str.

  • Extend list of allowed types in comparator with list and str.
  • Rewrite case test_should_not_allow_to_compare_version_with_string ->
    test_should_compare_version_string
  • Add new test cases:
    • test_should_compare_version_list
    • test_should_not_allow_to_compare_invalid_versionstring
  • Use pytest.mark.parametrize for test_should_compare_version_tuples
  • Update usage.rst to document all possibilities
  • Update CHANGELOG

@tomschr tomschr added the Bug Error, flaw or fault to produce incorrect or unexpected results label Apr 26, 2020
@tomschr tomschr requested a review from a team April 26, 2020 20:56
@tomschr tomschr self-assigned this Apr 26, 2020
@tomschr tomschr force-pushed the bugfix/244-missing-list-and-str branch from b5bc47a to f5a0aa4 Compare April 26, 2020 21:10
The VersionInfo.compare method allows already VersionInfo, dict,
tuple/list and str.

* Extend list of allowed types in comparator with list and str.
* Rewrite case test_should_not_allow_to_compare_version_with_string ->
  test_should_compare_version_string
* Add new test cases:
  - test_should_compare_version_list
  - test_should_not_allow_to_compare_invalid_versionstring
* Use pytest.mark.parametrize for test_should_compare_version_tuples
* Update usage.rst to document all possibilities
* Update CHANGELOG
@tomschr tomschr force-pushed the bugfix/244-missing-list-and-str branch from f5a0aa4 to 7057dc5 Compare April 26, 2020 21:15
@tomschr
Copy link
Member Author

tomschr commented May 1, 2020

@scls19fr any concerns with this PR? If not, I'd merge it on Saturday Tuesday to prepare for the release.

@tomschr tomschr merged commit 22ff5af into python-semver:master May 5, 2020
@tomschr tomschr deleted the bugfix/244-missing-list-and-str branch May 5, 2020 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Error, flaw or fault to produce incorrect or unexpected results

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot compare with list or string

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.