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

Update testing infrastructure for pytest #5

Merged
merged 11 commits into from May 4, 2016
Merged

Update testing infrastructure for pytest #5

merged 11 commits into from May 4, 2016

Conversation

timj
Copy link
Member

@timj 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.
Copy link
Contributor

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.

Copy link
Member Author

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.

@timj timj force-pushed the tickets/DM-5561 branch 4 times, most recently from 1ca3e2b to 747a1bc Compare May 4, 2016 17:09
timj added 10 commits May 4, 2016 10:10
 * Print function
 * Absolute import
 * Modern exception catching.
 * in rather than has_key
 * open not file
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.
@timj timj merged commit bfe0999 into master May 4, 2016
@ktlim ktlim deleted the tickets/DM-5561 branch August 25, 2018 05:57
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.

None yet

2 participants