Bug 1313259 - Fix some preprocessor unit tests to actually do the tests they're supposed to do. r=gps

--HG--
extra : rebase_source : 70e9a8ed265d1bb7f74dd1d37cd8e561e649bd5a
This commit is contained in:
Mike Hommey 2016-10-27 10:24:27 +09:00
parent 29650e6f7d
commit 158b715543

View File

@ -619,13 +619,13 @@ class TestPreprocessor(unittest.TestCase):
with MockedOpen({'f': '#include foo\n'}):
with self.assertRaises(Preprocessor.Error) as e:
self.pp.do_include('f')
self.assertEqual(e.key, 'FILE_NOT_FOUND')
self.assertEqual(e.exception.key, 'FILE_NOT_FOUND')
def test_include_undefined_variable(self):
with MockedOpen({'f': '#filter substitution\n#include @foo@\n'}):
with self.assertRaises(Preprocessor.Error) as e:
self.pp.do_include('f')
self.assertEqual(e.key, 'UNDEFINED_VAR')
self.assertEqual(e.exception.key, 'UNDEFINED_VAR')
def test_include_literal_at(self):
files = {