-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fix tests fstools #138
base: master
Are you sure you want to change the base?
Fix tests fstools #138
Conversation
These tests would only pass if the relevant tools were actually installed, but we're not running them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL @patch works on classes.
This is fine I guess. Did you consider a "ProbertTestCase" that does this mocking in setUp()?
I've pushed a sample commit with that, I think in this case it's not ideal as the name to patch is different for filesystem vs os. If I'm missing something let me know. |
Hm that's true (and it looks like you're patching the wrong path in test_os now?). Can we just patch the shutil module direclty instead though? |
1d30b12
to
6a00322
Compare
I pushed another version, I'm kind of ambivalent about the result though. I think in some cases this would be net beneficial but less so this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I think this is OK, but well. Do what you like :-)
The probert unit tests may fail, depending on if filesystem tools are installed on the host system. We don't actually run them, that's already mocked out. Mock out the check for them existing.