pytest-dev / unittest2pytest

helps rewriting Python `unittest` test-cases into `pytest` test-cases
GNU General Public License v3.0
128 stars 27 forks source link

Add testing For Python 3.7 #28

Closed jdufresne closed 5 years ago

jdufresne commented 5 years ago

Use 'dist: xenial' in Travis to as Travis's trusty doesn't support Python 3.7. This required dropping Python 3.3 support as xenial doesn't support Python 3.3. However, Python 3.3 is endo of life. It is no longer receiving bug fixes, including for security issues. It went EOL on 2017-09-29. pytest also does not support Python 3.3.

Required updating the use of pytest.mark.parametrize to avoid deprecated, removed features:

https://docs.pytest.org/en/latest/changelog.html#pytest-4-1-0-2019-01-05

pytest.mark.parametrize: in previous versions, errors raised by id functions were suppressed and changed into warnings. Now the exceptions are propagated, along with a pytest message informing the node, parameter value and index where the exception occurred.

Removed support for applying marks directly to values in @pytest.mark.parametrize. Use pytest.param instead.

htgoebel commented 5 years ago

Thanks for this pull-request. May I ask you to split this into 3 commits, as this pull-request actually contains 3 distinct changes:

  1. Remove support for Py 3.3. (setup.py). Should be first commit since the latest commit also changed setup.py).
  2. The changes to travis.yml and tox.ini
  3. The changes to test_all_fixes.py (maybe add the deprecation note to the commit-massage?)

To split the commit, git gui is IMHO very useful).

When updating a pull-request, you can simply (force) push the updated branch to github again. This will automatically update the pull-request (which follows the branch, not the commit). So you do not need to close the pull-request and open a new one. This also has the benefit that the discussion history is kept.

jdufresne commented 5 years ago

Done! Ready for additional feedback.

I decided to swap the order of 2 & 3 as the Travis changes will fail without first doing the parameterize fixes.

Thanks! :slightly_smiling_face:

htgoebel commented 5 years ago

Thanks for the pull-request and sorry for not merging earlier.