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

Unified Diff: webrtc/tools/video_analysis_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_test.py ('k') | webrtc/video/full_stack_tests_plot.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/tools/video_analysis_test.py
diff --git a/webrtc/tools/video_analysis_test.py b/webrtc/tools/video_analysis_test.py
index 483632bc4888d4c9ed919ce7970344bff31069e7..e0c0f4bc11ff7408d852ee225fc46fb435db2bec 100755
--- a/webrtc/tools/video_analysis_test.py
+++ b/webrtc/tools/video_analysis_test.py
@@ -13,28 +13,28 @@ from video_analysis import FindUsbPortForV4lDevices
class RunVideoAnalysisTest(unittest.TestCase):
- def setGlobPath(self, path1, path2):
+ def SetGlobPath(self, path1, path2):
self.path1 = path1
self.path2 = path2
def setUp(self):
self.path1 = ''
self.path2 = ''
- self.requestNbr = 1
+ self.request_nbr = 1
- def glob_mock(string):
+ def GlobMock(string):
# Eat incoming string.
del string
- if self.requestNbr == 1:
- self.requestNbr += 1
+ if self.request_nbr == 1:
+ self.request_nbr += 1
return self.path1
else:
- self.requestNbr = 1
+ self.request_nbr = 1
return self.path2
# Override the glob function with our own that returns a string set by the
# test.
- glob.glob = glob_mock
+ glob.glob = GlobMock
# Verifies that the correct USB id is returned.
def testFindUSBPortForV4lDevices(self):
@@ -42,7 +42,7 @@ class RunVideoAnalysisTest(unittest.TestCase):
'video4linux/video0')
short_path2 = ('/sys/bus/usb/devices/usb1/1-1/driver/4-3/4-3:1.0/'
'video4linux/video1')
- self.setGlobPath(short_path1, short_path2)
+ self.SetGlobPath(short_path1, short_path2)
short_usb_ids = ['4-4', '4-3']
self.assertEqual(FindUsbPortForV4lDevices('video0', 'video1'),
short_usb_ids)
@@ -51,16 +51,16 @@ class RunVideoAnalysisTest(unittest.TestCase):
'video4linux/video0')
long_path2 = ('/sys/bus/usb/devices/usb1/1-1/driver/3-2/3-2.1:1.0/'
'video4linux/video1')
- self.setGlobPath(long_path1, long_path2)
+ self.SetGlobPath(long_path1, long_path2)
long_usb_ids = ['3-3.1', '3-2.1']
self.assertEqual(FindUsbPortForV4lDevices('video0', 'video1'), long_usb_ids)
def testFindUSBPortForV4lDevicesNoDevice(self):
- noDeviceFound = ('')
- V4lDevice = ('/sys/bus/usb/devices/usb1/1-1/driver/3-2/3-2.1:1.0/'
+ no_device_found = ('')
+ v4l_device = ('/sys/bus/usb/devices/usb1/1-1/driver/3-2/3-2.1:1.0/'
'video4linux/video1')
- self.setGlobPath(noDeviceFound, V4lDevice)
+ self.SetGlobPath(no_device_found, v4l_device)
empty_list = []
self.assertEqual(FindUsbPortForV4lDevices('video0', 'video1'), empty_list)
« no previous file with comments | « webrtc/tools/py_event_log_analyzer/rtp_analyzer_test.py ('k') | webrtc/video/full_stack_tests_plot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698