mirror of https://github.com/scrapy/scrapy.git
use get_testenv() shortcut instead of get_pythonpath()
This commit is contained in:
parent
14e7121674
commit
c2561ca160
|
|
@ -1,15 +1,13 @@
|
|||
import sys
|
||||
import os
|
||||
from subprocess import Popen, PIPE
|
||||
import unittest
|
||||
|
||||
from scrapy.utils.test import get_pythonpath
|
||||
from scrapy.utils.test import get_testenv
|
||||
|
||||
class CmdlineTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.env = os.environ.copy()
|
||||
self.env['PYTHONPATH'] = get_pythonpath()
|
||||
self.env = get_testenv()
|
||||
self.env['SCRAPY_SETTINGS_MODULE'] = 'scrapy.tests.test_cmdline.settings'
|
||||
|
||||
def _execute(self, *new_args, **kwargs):
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ from tempfile import mkdtemp
|
|||
from twisted.trial import unittest
|
||||
|
||||
from scrapy.utils.python import retry_on_eintr
|
||||
from scrapy.utils.test import get_pythonpath
|
||||
from scrapy.utils.test import get_testenv
|
||||
|
||||
class ProjectTest(unittest.TestCase):
|
||||
project_name = 'testproject'
|
||||
|
|
@ -19,8 +19,7 @@ class ProjectTest(unittest.TestCase):
|
|||
self.cwd = self.temp_path
|
||||
self.proj_path = join(self.temp_path, self.project_name)
|
||||
self.proj_mod_path = join(self.proj_path, self.project_name)
|
||||
self.env = os.environ.copy()
|
||||
self.env['PYTHONPATH'] = get_pythonpath()
|
||||
self.env = get_testenv()
|
||||
|
||||
def tearDown(self):
|
||||
rmtree(self.temp_path)
|
||||
|
|
|
|||
Loading…
Reference in New Issue