diff --git a/scrapy/tests/__init__.py b/scrapy/tests/__init__.py index a102cf994..46c662312 100644 --- a/scrapy/tests/__init__.py +++ b/scrapy/tests/__init__.py @@ -16,4 +16,4 @@ tests_datadir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'sample def get_testdata(*paths): """Return test data""" path = os.path.join(tests_datadir, *paths) - return open(path).read() + return open(path, 'rb').read()