Merge "Improve debugging of missing elements."
This commit is contained in:
commit
1a681d3a4f
@ -50,7 +50,8 @@ def dependencies(element, elements_dir=None):
|
||||
else:
|
||||
raise
|
||||
|
||||
sys.stderr.write("ERROR: Element %s doesn't exists\n" % (element, ))
|
||||
sys.stderr.write("ERROR: Element '%s' not found in '%s'\n" %
|
||||
(element, elements_dir))
|
||||
exit(-1)
|
||||
|
||||
|
||||
|
@ -52,6 +52,10 @@ class TestElementDeps(TestCase):
|
||||
elements_dir=self.element_dir)
|
||||
self.assertEquals(set(['requires-foo', 'foo']), result)
|
||||
|
||||
def test_missing_deps(self):
|
||||
self.assertRaises(SystemExit, expand_dependencies, ['fake'],
|
||||
self.element_dir)
|
||||
|
||||
def test_transitive_deps(self):
|
||||
result = expand_dependencies(['requires-requires-foo'],
|
||||
elements_dir=self.element_dir)
|
||||
|
Loading…
Reference in New Issue
Block a user