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

Make sure testing cleans up after itself #940

Merged
merged 5 commits into from
May 7, 2020

Conversation

wren
Copy link
Member

@wren wren commented May 6, 2020

Fixes #939

This centralizes where we store all of our testing temporary files (in
features for now, but can easily be moved later), and cleans that central
location properly. This should result in a clean working directory after
running the testing suite.

Checklist

  • The code change is tested and works locally.
  • Tests pass. Your PR cannot be merged unless tests pass. --
    poetry run behave
  • The code passes linting via
    black (consistent code styling). --
    poetry run black --check . --verbose --diff
  • The code passes linting via pyflakes
    (logically errors and unused imports). -- poetry run pyflakes jrnl features
  • There is no commented out code in this PR.
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open
    Pull Requests for the same update/change?
  • Have you added an explanation of what your changes do and why you'd like
    us to include them?
  • Have you written new tests for your core changes, as applicable?

wren added 4 commits May 6, 2020 14:15
This adds the ability to run commands in a cache directory without the
test writer knowing where the cache directory is located. This will let
us expand later if we want to start using system temp folders, without
having to rewrite any of our tests.
@wren wren force-pushed the clean-testing-leftovers branch from 7e9d10a to 83547ac Compare May 6, 2020 23:25
@wren
Copy link
Member Author

wren commented May 6, 2020

Welp, Windows is failing for unknown (to me) reasons.

@micahellison Would you mind taking a look at this?

Copy link
Member

@micahellison micahellison left a comment

Choose a reason for hiding this comment

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

💯

@micahellison micahellison added the build Issues related to the build pipeline label May 7, 2020
@micahellison micahellison merged commit 0a3278d into jrnl-org:develop May 7, 2020
@wren wren deleted the clean-testing-leftovers branch July 11, 2020 17:14
wren added a commit that referenced this pull request Jul 25, 2020
This adds the ability to run commands in a cache directory without the
test writer knowing where the cache directory is located. This will let
us expand later if we want to start using system temp folders, without
having to rewrite any of our tests.

* clean up extra directories after running behave
* clean up white space issues
* move repeated code into function
* clean up behave code for creating cache directories
* Fix for windows shell parsing in our test suite

Co-authored-by: Micah Jerome Ellison <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues related to the build pipeline
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running testing suite leaves extra directories in environment
2 participants