diff --git a/bin/runtests.sh b/bin/runtests.sh index a714a208d..3c8079210 100755 --- a/bin/runtests.sh +++ b/bin/runtests.sh @@ -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) diff --git a/scrapy/conf.py b/scrapy/conf.py index c47c38626..795c8d7c0 100644 --- a/scrapy/conf.py +++ b/scrapy/conf.py @@ -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() diff --git a/scrapy/tests/test_cmdline/__init__.py b/scrapy/tests/test_cmdline/__init__.py index 3588436b9..d08f266f1 100644 --- a/scrapy/tests/test_cmdline/__init__.py +++ b/scrapy/tests/test_cmdline/__init__.py @@ -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): diff --git a/scrapy/tests/test_commands.py b/scrapy/tests/test_commands.py index 47f67338a..e2b671d19 100644 --- a/scrapy/tests/test_commands.py +++ b/scrapy/tests/test_commands.py @@ -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 diff --git a/scrapyd/eggutils.py b/scrapyd/eggutils.py index 27e661cd0..c507f0be5 100644 --- a/scrapyd/eggutils.py +++ b/scrapyd/eggutils.py @@ -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()