Bug 1313259 - Fix some preprocessor unit tests to actually do the tests they're supposed to do. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 27 Oct 2016 10:24:27 +0900
changeset 319789 48c39daa6910556bf069cc610814f43e5b577fa1
parent 319788 12987daa4d6800a5987b0eb197d344a1a41ba916
child 319790 ea1b1d7d1f7875182bc367c2702f774679c63868
push id20748
push userphilringnalda@gmail.com
push dateFri, 28 Oct 2016 03:39:55 +0000
treeherderfx-team@715360440695 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1313259
milestone52.0a1
Bug 1313259 - Fix some preprocessor unit tests to actually do the tests they're supposed to do. r=gps
python/mozbuild/mozbuild/test/test_preprocessor.py
--- 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):