Closed Bug 1471629 Opened 2 years ago Closed 2 years ago

Upgrade to pytest to version 3.6.2

Categories

(Testing :: web-platform-tests, enhancement, P1)

enhancement

Tracking

(firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

Attachments

(4 files, 1 obsolete file)

For my work on bug 1470530 I would need the latest release of pytest which currently is 3.6.2.
Something I noticed when running the tests locally via mach is that we make use of the pytest version as stored in `/third-party/python/pytest`. I don't think that this really is what we want, but instead `testing/web-platform/tests/tools/third_party/pytest` should be used, right?
Flags: needinfo?(james)
Flags: needinfo?(ato)
Oh, due to the move of source files for pytest I forgot to update the tools/localpaths.py file. Doing that now it works all just fine. Sorry.
Flags: needinfo?(james)
Flags: needinfo?(ato)
Comment on attachment 8988429 [details]
Bug 1471629 - [wpt] Add pytest version for visibility when running tests.

https://reviewboard.mozilla.org/r/253722/#review260304

::: testing/web-platform/tests/tools/third_party/pytest/src/_pytest/_version.py:1
(Diff revision 1)
> +_version = "3.6.2"

I'm not sure how to best get the version added. When running the tests via mach we do NOT install the packages but simply refer to the path the packages are located at.

Given that pytest only creates this file when setuptool installs the package, we currently don't have pytest version information when running the tests.

I don't know how web-platform-tests on Travis are run, and if the behavior is the same.

So has anyone an idea how to best achive that?
I have seen that in the web-platform-tests repository git submodules are or were used. When I compare paths all seems to be a bit out of date. So I'm actually not sure where I will have to bump the versions of the third_party packages. Is it just a replacement / addition / deletion of files, or do we have to do a submodule rev bump? Currently I don't assume the latter.
Flags: needinfo?(james)
Flags: needinfo?(ato)
Flags: needinfo?(Ms2ger)
Comment on attachment 8988429 [details]
Bug 1471629 - [wpt] Add pytest version for visibility when running tests.

https://reviewboard.mozilla.org/r/253722/#review260304

> I'm not sure how to best get the version added. When running the tests via mach we do NOT install the packages but simply refer to the path the packages are located at.
> 
> Given that pytest only creates this file when setuptool installs the package, we currently don't have pytest version information when running the tests.
> 
> I don't know how web-platform-tests on Travis are run, and if the behavior is the same.
> 
> So has anyone an idea how to best achive that?

As try shows this even doesn't seem to work. We still have an unknown version of pytest listed:

https://treeherder.mozilla.org/logviewer.html#?job_id=185323213&repo=try&lineNumber=1493

> STDOUT: platform linux2 -- Python 2.7.12, pytest-unknown, py-1.5.2, pluggy-0.5.3.dev 

So I will drop this commit, and we can figure out a solution later.
Attachment #8988418 - Flags: review?(ato)
Attachment #8988419 - Flags: review?(ato)
Attachment #8988420 - Flags: review?(ato)
Attachment #8988421 - Flags: review?(ato)
Attachment #8988429 - Attachment is obsolete: true
I think I would prefer it if you made an upstream PR for changes like this.
Flags: needinfo?(Ms2ger)
(In reply to :Ms2ger (⌚ UTC+1/+2) from comment #15)
> I think I would prefer it if you made an upstream PR for changes like this.

So are those sub modules still in use? Or should I just replace the content with the newer releases? Pytest and six are clearly broken. So I feel it's not used anymore.

https://github.com/web-platform-tests/wpt/blob/master/tools/.gitmodules#L11
Flags: needinfo?(Ms2ger)
I don't know. Maybe gsnedders or @foolip on github do?
Flags: needinfo?(Ms2ger) → needinfo?(geoffers+mozilla)
Comment on attachment 8988418 [details]
Bug 1471629 - [wpt] Add atomicwrites version 1.1.5 to third party libraries.

https://reviewboard.mozilla.org/r/253714/#review260400
Attachment #8988418 - Flags: review?(ato) → review+
Comment on attachment 8988419 [details]
Bug 1471629 - [wpt] Add more-itertools version 4.2.0 to third party libraries.

https://reviewboard.mozilla.org/r/253716/#review260402
Attachment #8988419 - Flags: review?(ato) → review+
Comment on attachment 8988420 [details]
Bug 1471629 - [wpt] Update attrs to version 18.1.0.

https://reviewboard.mozilla.org/r/253718/#review260404
Attachment #8988420 - Flags: review?(ato) → review+
Comment on attachment 8988421 [details]
Bug 1471629 - [wpt] Update pytest to version 3.6.2.

https://reviewboard.mozilla.org/r/253720/#review260406
Attachment #8988421 - Flags: review?(ato) → review+
(In reply to Henrik Skupin (:whimboo) from comment #13)
> I have seen that in the web-platform-tests repository git submodules are or
> were used. When I compare paths all seems to be a bit out of date. So I'm
> actually not sure where I will have to bump the versions of the third_party
> packages. Is it just a replacement / addition / deletion of files, or do we
> have to do a submodule rev bump? Currently I don't assume the latter.

You seem to have done the right thing.
Flags: needinfo?(ato)
Can you also confirm before you land this that the new pytest didn’t
_remove_ any dependencies?  If it did, they should also be removed.
Flags: needinfo?(hskupin)
(In reply to Henrik Skupin (:whimboo) from comment #16)
> (In reply to :Ms2ger (⌚ UTC+1/+2) from comment #15)
> > I think I would prefer it if you made an upstream PR for changes like this.
> 
> So are those sub modules still in use? Or should I just replace the content
> with the newer releases? Pytest and six are clearly broken. So I feel it's
> not used anymore.
> 
> https://github.com/web-platform-tests/wpt/blob/master/tools/.gitmodules#L11

That file is unused and should probably be removed.
Flags: needinfo?(geoffers+mozilla)
(In reply to :Ms2ger (⌚ UTC+1/+2) from comment #15)
> I think I would prefer it if you made an upstream PR for changes like this.

FWIW, given the wdspec tests get run on try, I think I'm oaky with it happening here.
(In reply to Andreas Tolfsen 「:ato」 from comment #23)
> Can you also confirm before you land this that the new pytest didn’t
> _remove_ any dependencies?  If it did, they should also be removed.

I inspected the install requirements when I worked on the patch. That's why I also added the new dependencies. Also to get to your questions, there were no removed dependencies.

(In reply to Geoffrey Sneddon [:gsnedders] from comment #24)
> > So are those sub modules still in use? Or should I just replace the content
> > with the newer releases? Pytest and six are clearly broken. So I feel it's
> > not used anymore.
> > 
> > https://github.com/web-platform-tests/wpt/blob/master/tools/.gitmodules#L11
> 
> That file is unused and should probably be removed.

Good to know. If I have a bit of spare time I will most likely create a PR.

Thanks everyone.
Flags: needinfo?(james)
Flags: needinfo?(hskupin)
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5c9d1cd46366
[wpt] Add atomicwrites version 1.1.5 to third party libraries. r=ato
https://hg.mozilla.org/integration/autoland/rev/bccabec0bf81
[wpt] Add more-itertools version 4.2.0 to third party libraries. r=ato
https://hg.mozilla.org/integration/autoland/rev/f46b4924c2a8
[wpt] Update attrs to version 18.1.0. r=ato
https://hg.mozilla.org/integration/autoland/rev/19b5a10c0635
[wpt] Update pytest to version 3.6.2. r=ato
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/11951 for changes under testing/web-platform/tests
Upstream PR merged
You need to log in before you can comment on or make changes to this bug.