mirror of https://github.com/zulip/zulip.git
Add help message for method-missing scenario in tests.
(We now have a full replacement for TestResult, but we don't support the full API of TestResult. If folks were to add new tests that caused TestCase to call our class with an unsupported method, this diff will provide hopefully a more clear error message.) (imported from commit 92033b12a1a901bd649ecb03e08779aa76bfef7a)
This commit is contained in:
parent
f2f9fb7c3b
commit
ad03644371
|
@ -2953,6 +2953,15 @@ class MyResult:
|
|||
print ''.join(traceback.format_exception(exctype, value, tb))
|
||||
sys.exit(1)
|
||||
|
||||
def __getattr__(self, attr):
|
||||
print
|
||||
print 'Attribute %s not supported' % attr
|
||||
print '''
|
||||
We have our own implementation of a result class that
|
||||
may no longer be playing nice with the latest Django.
|
||||
'''
|
||||
sys.exit(1)
|
||||
|
||||
class Runner(DjangoTestSuiteRunner):
|
||||
option_list = ()
|
||||
|
||||
|
|
Loading…
Reference in New Issue