Bug 1403012 - Fix TypeError when running python unittests via |mach test|, r?gbrown draft
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Fri, 12 Jan 2018 11:22:58 -0500
changeset 719690 aff112a8add98e6960773d88769a8ce6efbe9705
parent 719593 d2edd256c3aadb1cea48da0c8f62f725bd53cb76
child 745875 9b0f454d799d30cd9d8d45e14432567acf19468e
push id95340
push userahalberstadt@mozilla.com
push dateFri, 12 Jan 2018 16:26:49 +0000
reviewersgbrown
bugs1403012
milestone59.0a1
Bug 1403012 - Fix TypeError when running python unittests via |mach test|, r?gbrown Mach test now creates a structured logger and passes it down into all of the various test harnesses. Except |mach python-test| doesn't use structured logging yet, so the argument is not expected. For now, just accept **kwargs and ignore the logger. Eventually we'll want to get python tests to use structured logging, and we can use it at that point. MozReview-Commit-ID: 8LwdbgI0vqR
python/mach_commands.py
--- a/python/mach_commands.py
+++ b/python/mach_commands.py
@@ -91,17 +91,18 @@ class MachCommands(MachCommandBase):
             mozfile.remove(tempdir)
 
     def run_python_tests(self,
                          tests=[],
                          test_objects=None,
                          subsuite=None,
                          verbose=False,
                          stop=False,
-                         jobs=1):
+                         jobs=1,
+                         **kwargs):
         self._activate_virtualenv()
 
         def find_tests_by_path():
             import glob
             files = []
             for t in tests:
                 if t.endswith('.py') and os.path.isfile(t):
                     files.append(t)