Python3 linting changes for raptor draft
authorArmen Zambrano G. <armenzg@mozilla.com>
Tue, 18 Jun 2019 11:19:07 -0700
changeset 2220737 3043b1cfe974e78213b777c1fff4771af8b15f1d
parent 2102615 40c99f4752f968db32f189243b4432b18d1b3471
child 2220738 9a0488bdf19a5c50b26f2b8945ab81c29b77168e
push id406995
push userarmenzg@mozilla.com
push dateFri, 16 Aug 2019 13:25:04 +0000
treeherdertry@7765284d4b59 [default view] [failures only]
milestone69.0a1
Python3 linting changes for raptor
testing/raptor/raptor/output.py
testing/raptor/test/conftest.py
testing/raptor/test/test_raptor.py
tools/lint/py3.yml
--- a/testing/raptor/raptor/output.py
+++ b/testing/raptor/raptor/output.py
@@ -528,17 +528,17 @@ class Output(object):
         subtests = []
         names = _subtests.keys()
         names.sort(reverse=True)
         for name in names:
             _subtests[name]['value'] = filters.median(_subtests[name]['replicates'])
             subtests.append(_subtests[name])
             vals.append([_subtests[name]['value'], name])
 
-        print subtests
+        print(subtests)
         return subtests, vals
 
     def parseMotionmarkOutput(self, test):
         # for motionmark we want the frameLength:average value for each test
 
         # this is the format we receive the results in from the benchmark
         # i.e. this is ONE pagecycle of motionmark htmlsuite test:composited Transforms:
 
--- a/testing/raptor/test/conftest.py
+++ b/testing/raptor/test/conftest.py
@@ -69,14 +69,14 @@ def create_args():
                      debug_mode=False,
                      page_cycles=None,
                      page_timeout=None,
                      host=None,
                      run_local=True)
 
     def inner(**kwargs):
         for next_arg in kwargs:
-            print next_arg
-            print kwargs[next_arg]
+            print(next_arg)
+            print(kwargs[next_arg])
             setattr(args, next_arg, kwargs[next_arg])
         return args
 
     return inner
--- a/testing/raptor/test/test_raptor.py
+++ b/testing/raptor/test/test_raptor.py
@@ -1,9 +1,10 @@
 from __future__ import absolute_import, unicode_literals
+from six import reraise
 
 import os
 import requests
 import sys
 import threading
 import time
 
 import mozunit
@@ -159,16 +160,16 @@ def test_start_browser(get_binary, app):
     else:
         assert False  # browser didn't start
 
     raptor.clean_up()
     thread.join(5)
 
     if thread.exc is not None:
         exc, value, tb = thread.exc
-        raise exc, value, tb
+        reraise(exc, value, tb)
 
     assert not raptor.runner.is_running()
     assert raptor.runner.returncode is not None
 
 
 if __name__ == '__main__':
     mozunit.main()
--- a/tools/lint/py3.yml
+++ b/tools/lint/py3.yml
@@ -24,17 +24,16 @@ py3:
         - python/safety
         - security/manager/ssl
         - servo
         - testing/awsy
         - testing/firefox-ui/harness/firefox_ui_harness/runners/update.py
         - testing/gtest
         - testing/mochitest
         - testing/mozharness
-        - testing/raptor
         - testing/tools/iceserver
         - testing/tps
         - testing/web-platform
         - toolkit
         - tools/jprof
         - tools/profiler
         - tools/rb
         - tools/update-packaging