[LNT] r306909 - Fix all other linter warnings
Chris Matthews via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 30 15:57:53 PDT 2017
Author: cmatthews
Date: Fri Jun 30 15:57:53 2017
New Revision: 306909
URL: http://llvm.org/viewvc/llvm-project?rev=306909&view=rev
Log:
Fix all other linter warnings
Make _mkorder static, and remove unused.
Modified:
lnt/trunk/tests/server/ui/change_processing.py
Modified: lnt/trunk/tests/server/ui/change_processing.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/server/ui/change_processing.py?rev=306909&r1=306908&r2=306909&view=diff
==============================================================================
--- lnt/trunk/tests/server/ui/change_processing.py (original)
+++ lnt/trunk/tests/server/ui/change_processing.py Fri Jun 30 15:57:53 2017
@@ -22,6 +22,13 @@ from lnt.server.db.rules import rule_upd
logging.basicConfig(level=logging.DEBUG)
+def _mkorder(ts, rev):
+ order = ts.Order()
+ order.llvm_project_revision = rev
+ ts.add(order)
+ return order
+
+
class ChangeProcessingTests(unittest.TestCase):
"""Test fieldchange and regression building."""
@@ -33,11 +40,11 @@ class ChangeProcessingTests(unittest.Tes
# Get the test suite wrapper.
ts_db = self.ts_db = self.db.testsuite['nts']
- order1234 = self.order1234 = self._mkorder(ts_db, "1234")
- order1235 = self.order1235 = self._mkorder(ts_db, "1235")
- order1236 = self.order1236 = self._mkorder(ts_db, "1236")
- order1237 = self.order1237 = self._mkorder(ts_db, "1237")
- order1238 = self.order1238 = self._mkorder(ts_db, "1238")
+ order1234 = self.order1234 = _mkorder(ts_db, "1234")
+ order1235 = self.order1235 = _mkorder(ts_db, "1235")
+ order1236 = self.order1236 = _mkorder(ts_db, "1236")
+ order1237 = self.order1237 = _mkorder(ts_db, "1237")
+ order1238 = self.order1238 = _mkorder(ts_db, "1238")
start_time = end_time = datetime.datetime.utcnow()
machine = self.machine = ts_db.Machine("test-machine")
@@ -65,7 +72,7 @@ class ChangeProcessingTests(unittest.Tes
ts_db.add(sample)
a_field = self.a_field = list(sample.get_primary_fields())[0]
- a_field2 = self.a_field2 = list(sample.get_primary_fields())[1]
+ self.a_field2 = list(sample.get_primary_fields())[1]
field_change = self.field_change = ts_db.FieldChange(order1234,
order1236,
@@ -114,12 +121,6 @@ class ChangeProcessingTests(unittest.Tes
def tearDown(self):
self.db.close_all_engines()
- def _mkorder(self, ts, rev):
- order = ts.Order()
- order.llvm_project_revision = rev
- ts.add(order)
- return order
-
def test_startup(self):
pass
@@ -183,8 +184,8 @@ class ChangeProcessingTests(unittest.Tes
ts_db.commit()
r2 = rebuild_title(ts_db, self.regression)
- EXPECTED_TITLE = "Regression of 6 benchmarks: foo, bar"
- self.assertEquals(r2.title, EXPECTED_TITLE)
+ expected_title = "Regression of 6 benchmarks: foo, bar"
+ self.assertEquals(r2.title, expected_title)
def test_regression_evolution(self):
ts_db = self.ts_db
More information about the llvm-commits
mailing list