OptimisingTestSuite is a bit wasteful with @skip-decorated tests
Bug #1556979 reported by
Free Ekanayaka
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
testresources |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
If a test is decorated with the @unittest.skip, we know upfront that is not going to be run. Still OptimisingTestSuite builds the resources for it. I think there's room for being a bit more smart here.
Take the attached sample script (run it with "python test_foo.py"), you'll see that "make some resource" gets printed in the standard output even if the test is skipped altogether.
I'm attaching a sketch of a patch that would improve the situation, for these cases that we already know that the test will be skipped. If you think it's a viable solution I might port it to a proper branch with tests.
To post a comment you must log in.
Sketch patch for avoiding building resources unnecessarily when we know upfront that a test will be skipped.