mirror of https://github.com/scrapy/scrapy.git
added support to run scrapy tests with: python -m scrapy.tests
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40970
This commit is contained in:
parent
e3c9f5951a
commit
4093a4b83e
|
|
@ -1 +1,20 @@
|
|||
""" """
|
||||
"""
|
||||
scrapy.tests: this package contains all Scrapy unittests
|
||||
|
||||
To run all Scrapy unittests type:
|
||||
|
||||
python -m scrapy.tests
|
||||
|
||||
Keep in mind that some tests may be skipped if you don't have a MySQL database
|
||||
up and configured appropriately.
|
||||
"""
|
||||
|
||||
if __name__ == '__main__':
|
||||
import os
|
||||
from twisted.trial import runner, reporter
|
||||
|
||||
os.environ['SCRAPY_SETTINGS_DISABLED'] = '1'
|
||||
loader = runner.TestLoader()
|
||||
runner = runner.TrialRunner(reporter.TreeReporter)
|
||||
suite = loader.loadByNames(['scrapy'], recurse=True)
|
||||
runner.run(suite)
|
||||
|
|
|
|||
Loading…
Reference in New Issue