2009-03-05 11:12:07 +00:00
|
|
|
"""
|
2014-07-30 16:53:28 -03:00
|
|
|
tests: this package contains all Scrapy unittests
|
2009-03-05 11:12:07 +00:00
|
|
|
|
2009-05-16 20:11:23 -03:00
|
|
|
To run all Scrapy unittests go to Scrapy main dir and type:
|
2009-03-05 11:12:07 +00:00
|
|
|
|
2009-05-16 20:11:23 -03:00
|
|
|
bin/runtests.sh
|
|
|
|
|
|
|
|
If you're in windows use runtests.bat instead.
|
2009-03-05 11:12:07 +00:00
|
|
|
"""
|
2009-05-15 15:03:42 -03:00
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
tests_datadir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'sample_data')
|
|
|
|
|
|
|
|
def get_testdata(*paths):
|
|
|
|
"""Return test data"""
|
|
|
|
path = os.path.join(tests_datadir, *paths)
|
2009-05-15 19:19:05 -03:00
|
|
|
return open(path, 'rb').read()
|