scrapy/scrapy — pull request #733 by alexcepoi (2014-05-24 22:26:37+00:00)
Title: improvements to scrapy check/contracts

* report number of contracts run and time spent (similar to unittest)
* exit with code 1 if there are failures/errors (similar to unittest)
* capture and report errback errors (twisted or mw errors)
* capture and report callback errors (exceptions raised by spider)

Sample output for above changes (before there was none, as requests were ignored):
```
EE
======================================================================
ERROR: [myspider] first_callback (errback)
----------------------------------------------------------------------
DNS lookup failed: address 'httpbi.org' not found: [Errno 8] nodename nor servname provided, or not known.:

======================================================================
ERROR: [myspider] second_callback (callback)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/alex/work/sh/scrapy/scrapy/contracts/__init__.py", line 62, in cb_wrapper
output = cb(response)
File "/Users/alex/work/sh/scrapy/scrapy/contracts/__init__.py", line 114, in wrapper
output = list(iterate_spider_output(cb(response)))
File "/Users/alex/work/sh/scrapy/scrapy/contracts/__init__.py", line 114, in wrapper
output = list(iterate_spider_output(cb(response)))
File "", line 90, in second_callback
raise Exception('I raised an error here!')
Exception: I raised an error here!

----------------------------------------------------------------------
Ran 0 contracts in 0.990s

FAILED (errors=2)
```