Bug 1313259 - Fix some preprocessor unit tests to actually do the tests they're supposed to do. r?gps
--- a/python/mozbuild/mozbuild/test/test_preprocessor.py
+++ b/python/mozbuild/mozbuild/test/test_preprocessor.py
@@ -614,23 +614,23 @@ class TestPreprocessor(unittest.TestCase
'//@line 6 "CWD/f.js"\n'
'fin\n').replace('CWD/',
os.getcwd() + os.path.sep))
def test_include_missing_file(self):
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 = {
'@foo@': '#define foo foobarbaz\n',
'f': '#include @foo@\n#filter substitution\n@foo@\n',
}
with MockedOpen(files):