Repository navigation
Changing parametrized tests to be pytest 3.2.0 compatible - #6419
Conversation
|
Hi there @bsipocz 👋 - thanks for the pull request! I'm just a friendly 🤖 that checks for issues related to the changelog and making sure that this pull request is milestoned and labelled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part 😃. Everything looks good from my point of view! 👍 |
I'm surprised we weren't affected by this sooner, wouldn't have CircleCI started to fail a while back? |
| @pytest.mark.parametrize('distance', [1000*u.au, | ||
| 10*u.pc, | ||
| pytest.mark.xfail(10*u.kpc), | ||
| pytest.mark.xfail(100*u.kpc)]) |
|
Nope, they just did the change in pytest 3.2.0 released yesterday Anyway, this is now failing as circleCI already been set to run in parallel, so your fix is needed, too. |
d4c1c36 to
901d7c7
Compare
|
If we want to be less pytest version dependent, we could just remove these |
|
@mhvk - I definitely like that idea for the bugfix branch. For master for 3.0, we may still want to require pytest 3.1+, not just for this issue, but for other slightly annoying warning about the cfg heading. |
|
Indeed, better to stick with a standard rather than have a workaround for master, so let's require pytest >=3.1 for astropy 3.0. |
|
@astrofrog @eteq - are you OK with the proposed pytest version requirement change for 3.0? #6419 (comment) |
|
Changelog is added. The python3.4 will probably fail as the pytest 3.1 package is not yet built for it. As discussed above this will need a companion PR against the 2.0.x branch that rewrites the tests. I'll open that once the approach here is approved. |
|
Looks good to me. |
astrofrog
left a comment
There was a problem hiding this comment.
That's fine by me but I think you need to update the install_requires to specify this minimum version (and maybe the docs too?)
79a22fc to
3d3e35c
Compare
…irect marking of parameters. Bug fix branch counterpart of astropy#6419 to keep supporting pytest <3.1
3d3e35c to
a09c194
Compare
|
@astrofrog - This should be ready now. For the bugfix branch fix see #6430. |
|
This one looks good to me too. |
|
This needs pytest 3.1+ on py3.4 to fix the travis failure. I'll restart the job once it becomes available. |
|
While reading pytest documentation, I found a way to filter this pytest warning during collection: This could allow to keep pytest < 3.1 compatibility for some time, or maybe just for the maintenance branch ? |
|
@bsipocz - Ah ok, great ! |
453f849 to
05e0fc9
Compare
05e0fc9 to
2c3f266
Compare
2c3f266 to
c9add19
Compare
|
Merging this now as it's now passing and got the approval long time ago. |
This should fix #6418
However this also makes us incompatible with pytest <3.1.
So overall I'm not sure how to proceed, we definitely need to limit the pytest version in the bugfix branch rather than backport this, but it will probably be fine to release 3.0 with this requirement. The last release incompatible with this change was 3.0.7 and was released on 2017-03-14.