allow to disable the asserts
Hey - we use py.test as our product test platform - and we find it very useful.
One feature though we uses and might be nice if will be shared with the word is disable asserts during test development. When we write integration test and system test - that take long time to run - we asserts a lot of thing (the single assert per test methodology is nice but in practice it reduce the time take the tests to run) - and most of the time (again in development) we fail on asserts. Moreover - we use mocks for speed the development process of this kind of tests (find name errors and other thing that we don't want to waste half a hour to discover) - but the mocks tend to fail on the first assert the meet.
Therefore we used your great frame work and write some plugin that monkey patch the assert rewrite module with the following class instead of AssertionRewriter class.
class AssertionRemover(AssertionRewriter): def visit_Assert(self, assert_): return ast.copy_location(ast.Pass(), assert_)
and patches PYC_EXT - to '.pycNoAsserts'. That works nice and helped us a lot. but because of the entire monkey patching is kind of fragile (the code might of rewrite module might change someday and we will never know) it would be nice if this option will be supported naturally by py.test. (we know it sounds a strange feature to ask - the ability to disables asserts in test - but it works and allow us to reduce our development time)