Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert multiple tests into pytest.mark.parametrize #47

Merged
merged 7 commits into from May 16, 2018
Merged

Convert multiple tests into pytest.mark.parametrize #47

merged 7 commits into from May 16, 2018

Conversation

tomschr
Copy link
Member

@tomschr tomschr commented Jan 18, 2017

pytest.mark.parametrize has some benefits over multiple asserts:

  • each test can be selected individually
  • test code is just a one-liner
  • adding more tests is just a matter of putting more data into the list
  • gives you a more impressive amount of test cases 馃槈

It works for me and creates 91 tests

@scls19fr scls19fr mentioned this pull request May 12, 2018
@scls19fr
Copy link
Member

Hi @tomschr

this PR can't be merged because of conflicting file (tests.py which is now test_semver.py)
Could you rebase ?
I will be very please to merge your PR and close #77

Kind regards

@tomschr
Copy link
Member Author

tomschr commented May 16, 2018

@scls19fr I hope I did it right, I've rebased my fork and fixed conflicts in the test_semver.py file. If you like, you can squash them later. See commit a3cd83e.

Hope it make sense? 馃槂

@scls19fr
Copy link
Member

Thanks @tomschr for your great responsiveness!
Could you also add entry to https://github.com/k-bx/python-semver/blob/master/CHANGELOG for a 2.8.1 version

Something like

Version 2.8.1 (WIP)
=============
:Released: 2018-mm-dd
:Maintainer: S茅bastien Celles <s.celles@gmail.com>

* Issue #77 (PR #47). Parametrize tests.

Thanks again

@tomschr
Copy link
Member Author

tomschr commented May 16, 2018

@scls19fr No problem. I've updated the CHANGELOG in commit ae9208a. Hope this helps. 馃槈

@tomschr
Copy link
Member Author

tomschr commented May 16, 2018

Argh, sorry, I've overlooked the version, need to correct it in the next commit.

@scls19fr
Copy link
Member

Please add WIP or work in progress next to 2.8.1 so it will be very clear that this version haven't been released currently.
You can also change https://github.com/k-bx/python-semver/blob/e4e9e558bf3e1d2cd5f41a58bf4fc48ca5ae424a/semver.py#L9
so we will be ready for next release.

@tomschr
Copy link
Member Author

tomschr commented May 16, 2018

Please add WIP or work in progress next to 2.8.1 so it will be very clear that this version haven't been released currently.

Done in commit f29c9bb

You can also change python-semver/semver.py __version__

Done in commit 58d0fcf

@scls19fr scls19fr merged commit 1268276 into python-semver:master May 16, 2018
@scls19fr
Copy link
Member

scls19fr commented May 16, 2018

Thanks @tomschr for your contribution
Closes #77

@tomschr tomschr deleted the test-parametrize branch May 16, 2018 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants