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:
Pablo Hoffman 2009-03-05 11:12:07 +00:00
parent e3c9f5951a
commit 4093a4b83e
1 changed files with 20 additions and 1 deletions

View File

@ -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)