Removed hacky SCRAPY_SETTINGS_DISABLED environment variable

This commit is contained in:
Pablo Hoffman 2010-09-22 16:08:18 -03:00
parent b6c2b55e5b
commit a4639ffb06
5 changed files with 1 additions and 10 deletions

View File

@ -12,9 +12,6 @@ else
exit 1
fi
# disable custom settings for running tests in a neutral environment
export SCRAPY_SETTINGS_DISABLED=1
# use vsftpd (if available) for testing ftp feed storage
if type vsftpd >/dev/null 2>&1; then
vsftpd_conf=$(mktemp /tmp/vsftpd-XXXX)

View File

@ -34,7 +34,4 @@ def get_project_settings():
return settings
if os.environ.get('SCRAPY_SETTINGS_DISABLED'):
settings = CrawlerSettings()
else:
settings = get_project_settings()
settings = get_project_settings()

View File

@ -10,7 +10,6 @@ class CmdlineTest(unittest.TestCase):
def setUp(self):
self.env = os.environ.copy()
self.env['PYTHONPATH'] = os.path.dirname(scrapy.__path__[0])
self.env.pop('SCRAPY_SETTINGS_DISABLED', None)
self.env['SCRAPY_SETTINGS_MODULE'] = 'scrapy.tests.test_cmdline.settings'
def _execute(self, *new_args, **kwargs):

View File

@ -61,7 +61,6 @@ class CommandTest(ProjectTest):
super(CommandTest, self).setUp()
self.call('startproject', self.project_name)
self.cwd = join(self.temp_path, self.project_name)
self.env.pop('SCRAPY_SETTINGS_DISABLED', None)
self.env['SCRAPY_SETTINGS_MODULE'] = '%s.settings' % self.project_name

View File

@ -18,7 +18,6 @@ def get_spider_list_from_eggfile(eggfile, project):
env = os.environ.copy()
env['SCRAPY_PROJECT'] = project
env['SCRAPY_EGGFILE'] = f.name
env.pop('SCRAPY_SETTINGS_DISABLED', None)
proc = Popen(pargs, stdout=PIPE, cwd=tmpdir, env=env)
out = proc.communicate()[0]
return out.splitlines()