Bug 1288795 - remove dead assignments in test_emitter.py; r=chmanchester
authorNathan Froyd <froydnj@gmail.com>
Sat, 23 Jul 2016 00:28:05 -0400
changeset 346447 df0a5c25f8ab0731aada9d50a9bc68379c45dfd0
parent 346446 ba8cc31b9cf0ee27a5968f3dd02be24998df3c8d
child 346448 c7a461e12223126b0c03c8037e896e26cc0bb6f0
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1288795
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1288795 - remove dead assignments in test_emitter.py; r=chmanchester Prevailing style in the file for when read_topsrcdir is being tested for exception-throwingness is to omit the assignment, so let's make everything consistent.
python/mozbuild/mozbuild/test/frontend/test_emitter.py
--- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
@@ -199,17 +199,17 @@ class TestEmitterBasic(unittest.TestCase
         self.assertEqual(wanted, variables)
         self.maxDiff = maxDiff
 
     def test_use_yasm(self):
         # When yasm is not available, this should raise.
         reader = self.reader('use-yasm')
         with self.assertRaisesRegexp(SandboxValidationError,
             'yasm is not available'):
-            objs = self.read_topsrcdir(reader)
+            self.read_topsrcdir(reader)
 
         # When yasm is available, this should work.
         reader = self.reader('use-yasm',
                              extra_substs=dict(
                                  YASM='yasm',
                                  YASM_ASFLAGS='-foo',
                              ))
         objs = self.read_topsrcdir(reader)
@@ -268,29 +268,29 @@ class TestEmitterBasic(unittest.TestCase
         self.assertRegexpMatches(o.script, 'script.py$')
         self.assertEqual(o.method, 'make_bar')
         self.assertEqual(o.inputs, [])
 
     def test_generated_files_no_script(self):
         reader = self.reader('generated-files-no-script')
         with self.assertRaisesRegexp(SandboxValidationError,
             'Script for generating bar.c does not exist'):
-            objs = self.read_topsrcdir(reader)
+            self.read_topsrcdir(reader)
 
     def test_generated_files_no_inputs(self):
         reader = self.reader('generated-files-no-inputs')
         with self.assertRaisesRegexp(SandboxValidationError,
             'Input for generating foo.c does not exist'):
-            objs = self.read_topsrcdir(reader)
+            self.read_topsrcdir(reader)
 
     def test_generated_files_no_python_script(self):
         reader = self.reader('generated-files-no-python-script')
         with self.assertRaisesRegexp(SandboxValidationError,
             'Script for generating bar.c does not end in .py'):
-            objs = self.read_topsrcdir(reader)
+            self.read_topsrcdir(reader)
 
     def test_exports(self):
         reader = self.reader('exports')
         objs = self.read_topsrcdir(reader)
 
         self.assertEqual(len(objs), 1)
         self.assertIsInstance(objs[0], Exports)
 
@@ -309,26 +309,26 @@ class TestEmitterBasic(unittest.TestCase
 
     def test_exports_missing(self):
         '''
         Missing files in EXPORTS is an error.
         '''
         reader = self.reader('exports-missing')
         with self.assertRaisesRegexp(SandboxValidationError,
              'File listed in EXPORTS does not exist:'):
-            objs = self.read_topsrcdir(reader)
+            self.read_topsrcdir(reader)
 
     def test_exports_missing_generated(self):
         '''
         An objdir file in EXPORTS that is not in GENERATED_FILES is an error.
         '''
         reader = self.reader('exports-missing-generated')
         with self.assertRaisesRegexp(SandboxValidationError,
              'Objdir file listed in EXPORTS not in GENERATED_FILES:'):
-            objs = self.read_topsrcdir(reader)
+            self.read_topsrcdir(reader)
 
     def test_exports_generated(self):
         reader = self.reader('exports-generated')
         objs = self.read_topsrcdir(reader)
 
         self.assertEqual(len(objs), 2)
         self.assertIsInstance(objs[0], GeneratedFile)
         self.assertIsInstance(objs[1], Exports)
@@ -355,17 +355,17 @@ class TestEmitterBasic(unittest.TestCase
             self.assertTrue(path in expected)
             basenames = sorted(mozpath.basename(s) for s in strings)
             self.assertEqual(sorted(expected[path]), basenames)
 
     def test_test_harness_files_root(self):
         reader = self.reader('test-harness-files-root')
         with self.assertRaisesRegexp(SandboxValidationError,
             'Cannot install files to the root of TEST_HARNESS_FILES'):
-            objs = self.read_topsrcdir(reader)
+            self.read_topsrcdir(reader)
 
     def test_branding_files(self):
         reader = self.reader('branding-files')
         objs = self.read_topsrcdir(reader)
 
         self.assertEqual(len(objs), 1)
         self.assertIsInstance(objs[0], BrandingFiles)
 
@@ -535,17 +535,17 @@ class TestEmitterBasic(unittest.TestCase
         for t in obj.tests:
             self.assertTrue(t['manifest'].endswith(expected_manifests[t['name']]))
 
     def test_python_unit_test_missing(self):
         """Missing files in PYTHON_UNIT_TESTS should raise."""
         reader = self.reader('test-python-unit-test-missing')
         with self.assertRaisesRegexp(SandboxValidationError,
             'Path specified in PYTHON_UNIT_TESTS does not exist:'):
-            objs = self.read_topsrcdir(reader)
+            self.read_topsrcdir(reader)
 
     def test_test_manifest_keys_extracted(self):
         """Ensure all metadata from test manifests is extracted."""
         reader = self.reader('test-manifest-keys-extracted')
 
         objs = [o for o in self.read_topsrcdir(reader)
                 if isinstance(o, TestManifest)]
 
@@ -985,17 +985,17 @@ class TestEmitterBasic(unittest.TestCase
             reader = self.reader('dist-files-missing')
             self.read_topsrcdir(reader)
 
     def test_final_target_pp_files_non_srcdir(self):
         '''Test that non-srcdir paths in FINAL_TARGET_PP_FILES throws errors.'''
         reader = self.reader('final-target-pp-files-non-srcdir')
         with self.assertRaisesRegexp(SandboxValidationError,
              'Only source directory paths allowed in FINAL_TARGET_PP_FILES:'):
-            objs = self.read_topsrcdir(reader)
+            self.read_topsrcdir(reader)
 
     def test_android_res_dirs(self):
         """Test that ANDROID_RES_DIRS works properly."""
         reader = self.reader('android-res-dirs')
         objs = self.read_topsrcdir(reader)
 
         self.assertEqual(len(objs), 1)
         self.assertIsInstance(objs[0], AndroidResDirs)