Merge lp://qastaging/~zomux/twistedchecker/auto-find-exception into lp://qastaging/~twistedchecker-dev/twistedchecker/trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Jonathan Lange | ||||
Approved revision: | 23 | ||||
Merged at revision: | 26 | ||||
Proposed branch: | lp://qastaging/~zomux/twistedchecker/auto-find-exception | ||||
Merge into: | lp://qastaging/~twistedchecker-dev/twistedchecker/trunk | ||||
Diff against target: |
368 lines (+315/-0) 4 files modified
twistedchecker/core/exceptionfinder.py (+84/-0) twistedchecker/core/runner.py (+93/-0) twistedchecker/test/test_exceptionfinder.py (+91/-0) twistedchecker/test/test_runner.py (+47/-0) |
||||
To merge this branch: | bzr merge lp://qastaging/~zomux/twistedchecker/auto-find-exception | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Lange | Approve | ||
Review via email:
|
Description of the change
Automatically find name exceptions for functions, methods and classes in Twisted.
Detail:
1. Find patterns like 'getattr(something, "state_%s" % foo)' and 'getattr(something, "state_" + foo)' and generate a list of these patterns (end with underscore).
2. modify regex that verifies function, method and class name in NameChecker, to ignore these patterns.
Currently found patterns in Twisted:
telnet_, sync_, _fromString_, auth_, perspective_, handleStatus_, Record_, _parseSVNEntries_, get_, xmlrpc_, state_, iac_, macro_, handle_, start_, _process_, ctcpReply_, parse_, dcc_, _toString_, observe_, func_, async_, spew_, soap_, _stat_, convert_, channel_, ftp_, global_, packet_, removeTrigger_, ext_, class_, opt_, do_, request_, render_, ssh_, _unjelly_, response_, agentc_, cmd_, key_, ctcpQuery_, generate_, view_, ssh_USERAUTH_
Invalid names remain in Twisted:
check_, dont_, esmtpState_, inotify_, inotify_, on_, packRequest_, parseRequest_, smtpState_, testAddingBadPr
The tests for exceptionfinder aren't really unit tests, but rather integration tests. I don't think that should block landing at this point though.