-
Notifications
You must be signed in to change notification settings - Fork 7
Description
It would be awesome if there was eg. a decorator that would cause a test case to be ignored by nose-detecthttp.
Use case: possibly not common, but I have a regression test for a failure that happens deep in httplib when any header is of type unicode and the body contains binary data. (On python 2.7 this causes UnicodeDecodeError).
I can't use VCR for this regression test because it would intercept the call at too high a level (up in httplib2). So I want to instead mock.patch a method in httplib itself, deep enough to prevent network access, but still allow the error condition to be triggered.
Since we're using nose-detecthttp, I can't do that without it complaining every time I run the test. And if I decorate my test method with use_cassette, then vcr intercepts the call at too high a level (up in httplib2) and the bug would never actually be triggered. So my regression test case is no longer verifying that my bugfix hasn't regressed ... it will always pass unless I force vcr to re-record.