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: make use of our custom filesystem assertions for conciseness #4850

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

wisp3rwind
Copy link
Member

Follow-up to #4830, #4848 and #4849:

I've had #3690 in the pipeline for a long time; and it has grown too big to look at in one piece. This is just the first commit rebased on master. It is still quite big, but only touches test code, so should be safe (assuming CI is green).

this replaces assertions of the form

self.assertTrue(os.path.exists(syspath(path)))

by

self.assertExists(path)

which includes the syspath conversion and is much easier to read.

Occurences where located using

git grep -E 'assert(True|False).*(isdir|isfile|exist)'

this replaces assertions of the form
    self.assertTrue(os.path.exists(syspath(path)))
by
    self.assertExists(path)
which includes the syspath conversion and is much easier to read.

Occurences where located using
    git grep -E 'assert(True|False).*(isdir|isfile|exist)'
@wisp3rwind wisp3rwind mentioned this pull request Jul 16, 2023
1 task
@wisp3rwind
Copy link
Member Author

I'll just go ahead on this one and merge; given that it is a fairly straightforward refactoring of tests, there seems little need for a thorough review.

@wisp3rwind wisp3rwind merged commit fc05a85 into beetbox:master Jul 18, 2023
@wisp3rwind wisp3rwind deleted the pr_add_syspath_4 branch July 18, 2023 20:02
@sampsyo
Copy link
Member

sampsyo commented Jul 18, 2023

Yay; very good call!

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

Successfully merging this pull request may close these issues.

2 participants