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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace tmpdir fixture with tmp_path in tests #3551

Closed
asvetlov opened this issue Jan 17, 2019 · 2 comments · Fixed by #3955
Closed

Replace tmpdir fixture with tmp_path in tests #3551

asvetlov opened this issue Jan 17, 2019 · 2 comments · Fixed by #3955
Labels

Comments

@asvetlov
Copy link
Member

I always stumble on py.path methods.
A new pytest supports tmp_path fixture https://docs.pytest.org/en/latest/tmpdir.html#the-tmp-path-factory-fixture to work with pathlib.Path.

The issue is easy and waits for a champion.

@asvetlov asvetlov added the good first issue Good for newcomers label Jan 17, 2019
@aio-libs-bot
Copy link

GitMate.io thinks possibly related issues are #1459 (Tests for demo polls app fail with "fixture 'event_loop' not found"), #2148 (Failed tests), #304 (multipart tests), #858 (replace http parser?), and #1583 (normalize_path_middleware tests failures).

@gyermolenko
Copy link
Contributor

gyermolenko commented Jan 31, 2019

I found it relevant to current issue, adding for context: ref pytest-dev/pytest#4680 and two other tmp_path defects were fixed in pytest 4.2.
And pytest 4.2 has just beed released.

asvetlov pushed a commit that referenced this issue May 13, 2019
@helpr helpr bot added the pr-available label Aug 2, 2019
@helpr helpr bot added pr-merged and removed pr-available labels Aug 2, 2019
asvetlov pushed a commit that referenced this issue Aug 2, 2019
tmp_path is the replacement fixture in pytest for tmpdir; tmp_path
uses the builtin pathlib.Path class. As it says on the tin, this
commit replaces every instance of tmpdir in the test suite with
tmp_path. Aside from s/tmpdir/tmp_path/ this also required changing
instances of `tmpdir.join(foo)` to `tmp_path / foo`.

This is intended to comprehensively address #3551 and should have
no side effects.
webknjaz pushed a commit to webknjaz/aiohttp that referenced this issue Jan 28, 2024
)

tmp_path is the replacement fixture in pytest for tmpdir; tmp_path
uses the builtin pathlib.Path class. As it says on the tin, this
commit replaces every instance of tmpdir in the test suite with
tmp_path. Aside from s/tmpdir/tmp_path/ this also required changing
instances of `tmpdir.join(foo)` to `tmp_path / foo`.

This is intended to comprehensively address aio-libs#3551 and should have
no side effects.

(cherry picked from commit 8960063)
webknjaz pushed a commit to webknjaz/aiohttp that referenced this issue Jan 28, 2024
)

tmp_path is the replacement fixture in pytest for tmpdir; tmp_path
uses the builtin pathlib.Path class. As it says on the tin, this
commit replaces every instance of tmpdir in the test suite with
tmp_path. Aside from s/tmpdir/tmp_path/ this also required changing
instances of `tmpdir.join(foo)` to `tmp_path / foo`.

This is intended to comprehensively address aio-libs#3551 and should have
no side effects.

(cherry picked from commit 8960063)
webknjaz pushed a commit to webknjaz/aiohttp that referenced this issue Jan 28, 2024
)

tmp_path is the replacement fixture in pytest for tmpdir; tmp_path
uses the builtin pathlib.Path class. As it says on the tin, this
commit replaces every instance of tmpdir in the test suite with
tmp_path. Aside from s/tmpdir/tmp_path/ this also required changing
instances of `tmpdir.join(foo)` to `tmp_path / foo`.

This is intended to comprehensively address aio-libs#3551 and should have
no side effects.

(cherry picked from commit 8960063)
webknjaz pushed a commit to webknjaz/aiohttp that referenced this issue Jan 28, 2024
)

tmp_path is the replacement fixture in pytest for tmpdir; tmp_path
uses the builtin pathlib.Path class. As it says on the tin, this
commit replaces every instance of tmpdir in the test suite with
tmp_path. Aside from s/tmpdir/tmp_path/ this also required changing
instances of `tmpdir.join(foo)` to `tmp_path / foo`.

This is intended to comprehensively address aio-libs#3551 and should have
no side effects.

(cherry picked from commit 8960063)
webknjaz added a commit that referenced this issue Jan 28, 2024
…mp_path (#3551) (#8075)

**This is a backport of PR #3955 as merged into master
(8960063).**

tmp_path is the replacement fixture in pytest for tmpdir; tmp_path
uses the builtin pathlib.Path class. As it says on the tin, this
commit replaces every instance of tmpdir in the test suite with
tmp_path. Aside from s/tmpdir/tmp_path/ this also required changing
instances of `tmpdir.join(foo)` to `tmp_path / foo`.

This is intended to comprehensively address and close #3551, and
should have no side effects. This does not affect end users.

Co-authored-by: Matt VanEseltine <[email protected]>
webknjaz added a commit that referenced this issue Jan 28, 2024
…p_path (#3551) (#8076)

**This is a backport of PR #3955 as merged into master
(8960063).**

tmp_path is the replacement fixture in pytest for tmpdir; tmp_path
uses the builtin pathlib.Path class. As it says on the tin, this
commit replaces every instance of tmpdir in the test suite with
tmp_path. Aside from s/tmpdir/tmp_path/ this also required changing
instances of `tmpdir.join(foo)` to `tmp_path / foo`.

This is intended to comprehensively address and close #3551, and
should have no side effects. This does not affect end users.

Co-authored-by: Matt VanEseltine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants