зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1254374 - Remove the old TestConfigure.test_imports test. r=nalexander
It now duplicates the test added in bug 1256573, which is actually better.
This commit is contained in:
Родитель
a88d164819
Коммит
03fcfe8491
|
@ -147,22 +147,6 @@ include(include_path)
|
|||
# The order of the decorators matter: @imports needs to appear after other
|
||||
# decorators.
|
||||
option('--with-imports', nargs='?', help='Imports')
|
||||
@depends('--with-imports')
|
||||
@imports(_from='mozbuild.configure.options', _import='OptionValue')
|
||||
def with_imports(value):
|
||||
if value:
|
||||
return isinstance(value, OptionValue)
|
||||
|
||||
set_config('IMPORTS', with_imports)
|
||||
|
||||
# Trying to import manually will fail at runtime.
|
||||
@depends('--with-imports')
|
||||
def with_imports(value):
|
||||
if len(value) and value[0] == 'break':
|
||||
from mozbuild.configure.options import OptionValue
|
||||
return isinstance(value, OptionValue)
|
||||
|
||||
set_config('IMPORTS2', with_imports)
|
||||
|
||||
# A limited set of functions from os.path are exposed by default.
|
||||
@depends('--with-imports')
|
||||
|
|
|
@ -227,14 +227,6 @@ class TestConfigure(unittest.TestCase):
|
|||
config = self.get_config(env={'CC': 'clang'})
|
||||
self.assertNotIn('CFLAGS', config)
|
||||
|
||||
def test_imports(self):
|
||||
config = self.get_config(['--with-imports'])
|
||||
self.assertIn('IMPORTS', config)
|
||||
self.assertEquals(config['IMPORTS'], True)
|
||||
|
||||
with self.assertRaises(ImportError):
|
||||
self.get_config(['--with-imports=break'])
|
||||
|
||||
def test_imports(self):
|
||||
config = {}
|
||||
out = StringIO()
|
||||
|
|
Загрузка…
Ссылка в новой задаче