Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1019)

Unified Diff: webrtc/tools/py_event_log_analyzer/rtp_analyzer_test.py

Issue 2812273002: Fix lint errors to enable stricter PyLint rules (Closed)
Patch Set: Rebased Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/tools/py_event_log_analyzer/rtp_analyzer.py ('k') | webrtc/tools/video_analysis_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/tools/py_event_log_analyzer/rtp_analyzer_test.py
diff --git a/webrtc/tools/py_event_log_analyzer/rtp_analyzer_test.py b/webrtc/tools/py_event_log_analyzer/rtp_analyzer_test.py
index 6109d7f49ceb8d58b0cff45ae9c69f6a7b9e37e8..dc6cb22509fb3ae0ebcb4d7cc48e7857713d6d29 100755
--- a/webrtc/tools/py_event_log_analyzer/rtp_analyzer_test.py
+++ b/webrtc/tools/py_event_log_analyzer/rtp_analyzer_test.py
@@ -17,19 +17,19 @@ or
import collections
import unittest
-missing_numpy = False
+MISSING_NUMPY = False # pylint: disable=invalid-name
try:
import numpy
import rtp_analyzer
except ImportError:
- missing_numpy = True
+ MISSING_NUMPY = True
FakePoint = collections.namedtuple("FakePoint",
["real_send_time_ms", "absdelay"])
class TestDelay(unittest.TestCase):
- def assertMaskEqual(self, masked_array, data, mask):
+ def AssertMaskEqual(self, masked_array, data, mask):
self.assertEqual(list(masked_array.data), data)
if isinstance(masked_array.mask, numpy.bool_):
@@ -40,23 +40,22 @@ class TestDelay(unittest.TestCase):
def testCalculateDelaySimple(self):
points = [FakePoint(0, 0), FakePoint(1, 0)]
- mask = rtp_analyzer.calculate_delay(0, 1, 1, points)
- self.assertMaskEqual(mask, [0, 0], False)
+ mask = rtp_analyzer.CalculateDelay(0, 1, 1, points)
+ self.AssertMaskEqual(mask, [0, 0], False)
def testCalculateDelayMissing(self):
points = [FakePoint(0, 0), FakePoint(2, 0)]
- mask = rtp_analyzer.calculate_delay(0, 2, 1, points)
- self.assertMaskEqual(mask, [0, -1, 0], [False, True, False])
+ mask = rtp_analyzer.CalculateDelay(0, 2, 1, points)
+ self.AssertMaskEqual(mask, [0, -1, 0], [False, True, False])
def testCalculateDelayBorders(self):
points = [FakePoint(0, 0), FakePoint(2, 0)]
- mask = rtp_analyzer.calculate_delay(0, 3, 2, points)
- self.assertMaskEqual(mask, [0, 0, -1], [False, False, True])
+ mask = rtp_analyzer.CalculateDelay(0, 3, 2, points)
+ self.AssertMaskEqual(mask, [0, 0, -1], [False, False, True])
if __name__ == "__main__":
- if missing_numpy:
- # pylint: disable=superfluous-parens
- print("Missing numpy, skipping test.")
+ if MISSING_NUMPY:
+ print "Missing numpy, skipping test."
else:
unittest.main()
« no previous file with comments | « webrtc/tools/py_event_log_analyzer/rtp_analyzer.py ('k') | webrtc/tools/video_analysis_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698