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
Update testing infrastructure for pytest #5
Conversation
timj
commented
Apr 27, 2016
- Add support for testing binaries.
- Reset leak counter after memory test runs.
- flake8 cleanups.
This is required to allow subsequent test files to be run in a clean leak environment and not be contaminated by previous failures. Particularly important if multiple test files are being run in the same process.
|
||
test_function = cls._test_builder(root, binary) | ||
|
||
This function does not attach the created test function to a class. |
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.
I don't understand and would appreciate rewording or more explanation. I can think of (at least) two possible meanings:
- The returned function is an unbound method of this class, so you must explicitly specify the "self" argument.
- The function is a free function.
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.
It returns a a free function that is expected to be bound to a class. This may really be an artifact of the way I developed it. I could remove this static method completely and do everything in discover_tests
or I could make _test_builder
a class method without returning anything.
1ca3e2b
to
747a1bc
Compare
* Print function * Absolute import * Modern exception catching. * in rather than has_key * open not file
productDir was replaced in commit d833a02
There are some remaining issues relating to pdb imports.
This is needed if we wish to test executable C++ binaries from a Python test runner.
Uses psutil. The test is skipped if psutil can not be imported.
* Add the setup_module call. * No longer use suite() system. * Add memory test as explicit class.