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

tests: run: Use the tmp_path fixture instead of tmpdir. #1073

Merged
merged 1 commit into from Jul 9, 2021

Conversation

prah23
Copy link
Member

@prah23 prah23 commented Jul 8, 2021

Commit structure:

Testing and linting:
I've ran tests locally on each commit. I've also ran black checks and then the more extensive ./tools/lint-all.

The `tmpdir` fixture under `pytest` is a `py.path.local` object,
belonging to the `py` library, which is currently under maintenance
mode, mentioned in the note here:
https://py.readthedocs.io/en/latest/path.html#py-path.

This commit migrates from `tmpdir` to using the `tmp_path` fixture
instead, which is a `pathlib.Path` object.

Reference: https://docs.pytest.org/en/6.2.x/tmpdir.html
@neiljp neiljp merged commit 8cd7940 into zulip:main Jul 9, 2021
@neiljp
Copy link
Collaborator

neiljp commented Jul 9, 2021

@prah23 Thanks for this - I just tagged it with a refactor: but otherwise looks good.

Another good refactor sweep to look at would be to be consistent with using using / vs os.path.join.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants