Re: [infra-tests] use context manager instead of prerun script (#5771)

Review status: 7 of 9 files reviewed at latest revision, 3 unresolved discussions, some commit checks pending.

---

*[tools/wptrunner/wptrunner/environment.py, line 99 at r1](https://reviewable.io:443/reviews/w3c/web-platform-tests/5771#-KjF2kAMwZ1MCr0_edvL:-KjII_p69rTTW4jLZQg6:b-896fix) ([raw file](https://github.com/w3c/web-platform-tests/blob/cd58b81d82ac63d963c38f05827deb68b236cead/tools/wptrunner/wptrunner/environment.py#L99)):*
<details><summary><i>Previously, jgraham wrote…</i></summary><blockquote>

I might put these last in the list, in case they depend on any other state. Clearly other state should not depend on these things.
</blockquote></details>

Done.

---

*[tools/wptrunner/wptrunner/browsers/sauce.py, line 139 at r1](https://reviewable.io:443/reviews/w3c/web-platform-tests/5771#-KjF2XKggMVMy3R3A-d-:-KjIIbR5XH0q7rLMVwC3:b-896fix) ([raw file](https://github.com/w3c/web-platform-tests/blob/cd58b81d82ac63d963c38f05827deb68b236cead/tools/wptrunner/wptrunner/browsers/sauce.py#L139)):*
<details><summary><i>Previously, jgraham wrote…</i></summary><blockquote>

I think this shoud go in `__enter__` since it allocates resources.
</blockquote></details>

Done.

---

*[tools/wptrunner/wptrunner/browsers/sauce.py, line 167 at r1](https://reviewable.io:443/reviews/w3c/web-platform-tests/5771#-KjF2dYWvZELhGVUm0D6:-KjIIcuS5gDYPLmUpfdV:b-896fix) ([raw file](https://github.com/w3c/web-platform-tests/blob/cd58b81d82ac63d963c38f05827deb68b236cead/tools/wptrunner/wptrunner/browsers/sauce.py#L167)):*
<details><summary><i>Previously, jgraham wrote…</i></summary><blockquote>

Also delete the tempdir, if any.
</blockquote></details>

Done.

---


*Comments from [Reviewable](https://reviewable.io:443/reviews/w3c/web-platform-tests/5771)*
<!-- Sent from Reviewable.io -->


View on GitHub: https://github.com/w3c/web-platform-tests/pull/5771#issuecomment-299163994

Received on Thursday, 4 May 2017 11:53:40 UTC