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:
Mike Hommey 2016-04-12 15:00:40 +09:00
Родитель a88d164819
Коммит 03fcfe8491
2 изменённых файлов: 0 добавлений и 24 удалений

Просмотреть файл

@ -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()