Skip to content

Code quality: Tests upgrade: Use pathlib for files read/write#1718

Merged
insspb merged 34 commits intomasterfrom
code-quality-tests-use-pathlib
Jun 8, 2022
Merged

Code quality: Tests upgrade: Use pathlib for files read/write#1718
insspb merged 34 commits intomasterfrom
code-quality-tests-use-pathlib

Conversation

@insspb
Copy link
Copy Markdown
Member

@insspb insspb commented Jun 8, 2022

This is related to #1403

This PR include only file operation replace in tests, not covering all scope of #1403

This is done to be focused and for easy review. Other PR related to #1403 will be soon.

@insspb insspb added needs-review PR Only: This PR require review from other developer code style This issue/PR relates to the project code style modification feature This issue/PR relates to major feature request. labels Jun 8, 2022
Copy link
Copy Markdown
Contributor

@alkatar21 alkatar21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open() and Path().open() should always be closed, preferably with a context manager, otherwise there will be open file handles. This does not change with pathlib. There are more places, which I have not marked. (The methods like read_text take care of it themselves, but open does not.)

insspb and others added 3 commits June 8, 2022 17:16
…g_cookiecutter.py)

Co-authored-by: alkatar21 <61387986+alkatar21@users.noreply.github.com>
…ctories.py)

Co-authored-by: alkatar21 <61387986+alkatar21@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@alkatar21 alkatar21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok at first glance now.

@insspb insspb merged commit 7b81306 into master Jun 8, 2022
@insspb insspb deleted the code-quality-tests-use-pathlib branch June 9, 2022 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code style This issue/PR relates to the project code style modification feature This issue/PR relates to major feature request. needs-review PR Only: This PR require review from other developer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants