mirror of https://github.com/scrapy/scrapy.git
Add error handling in contracts
This commit is contained in:
parent
c8f3d07e86
commit
fb7d4cbce3
|
|
@ -41,7 +41,11 @@ class ContractsManager(object):
|
|||
requests = []
|
||||
for method in self.tested_methods_from_spidercls(type(spider)):
|
||||
bound_method = spider.__getattribute__(method)
|
||||
requests.append(self.from_method(bound_method, results))
|
||||
try:
|
||||
requests.append(self.from_method(bound_method, results))
|
||||
except:
|
||||
case = _create_testcase(bound_method, 'contract')
|
||||
results.addError(case, sys.exc_info())
|
||||
|
||||
return requests
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue