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

Refactor RenameTest #212

Draft
wants to merge 1 commit into
base: 2.40.x
Choose a base branch
from
Draft

Refactor RenameTest #212

wants to merge 1 commit into from

Conversation

ramchale
Copy link
Contributor

  • Only remove temp directory after all tests have run
  • Use DataProvider for filter config and input variations
Q A
Documentation no
Bugfix no
BC Break no
New Feature no
RFC no
QA yes

Description

Draft PR to discuss refactoring of RenameTest.

Started looking at this as part of the moving the Rename filter to v3, but this feels like a big enough piece of refactoring in itself to be worth sense checking.

As DataProviders run before any of the test hooks, the creation of the tmp test file is moved to a static method that creates it on first use, and then it's not removed until all the tests in RenameTest have run. Likewise for the sub directory needed for testing moving a file to a target directory.

The cleanup for the indvidual files created by tests has been moved to each test. Could potentially be moved back to tearDown if we're not concerned about the number of redundant calls, and depending on what seems more readable.

- Only remove temp directory after all tests have run
- Use DataProvider for filter config and input variations

Signed-off-by: ramchale <[email protected]>
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.

1 participant