Part of lp.services.testing
|Function||patch_find_tests||Add a post-processing hook to zope.testing.testrunner.find_tests.|
|Function||filter_tests||Create a hook for
This is useful for things like filtering tests or listing tests.
|Parameters||hook||A callable that takes the output of the real
patch_find_teststhat filters tests based on id.
Note great care is taken to preserve the ordering of the original test cases, which is quite important if trying to figure out test isolation bugs. The original ordering is maintained within layers but since the results are returned as a dictionary the caller may shuffle the way the layers are run and there is nothing to be done about that here. In practice the layers are seen to be run in the same order.
However, test cases can still be reordered if
reorder_tests is set to
True: this is useful when tests are shuffled and the test shuffler is
initialized using a particoular value. This way the same seed produces
the same random ordering, regardless of whether the tests are filtered
using -t or --load-list.
Should a test be listed, but not present in any of the suites, it is silently ignored.
|Parameters||list_name||A filename that contains a newline-separated list of
test ids, as generated by |
|reorder_tests||if True, the tests contained in |
|Returns||A callable that takes a result of |