third_party/blink/PRESUBMIT_test.py
def testCheckChangeOnUploadWithBlinkAndChromiumFiles(self, _):
        """This verifies that CheckChangeOnUpload will only call
        check_blink_style.py on non-test files.
        """
        diff_file_blink_h = ['some diff']
        diff_file_chromium_h = ['another diff']
        diff_file_test_expectations = ['more diff']
        mock_input_api = MockInputApi()
        mock_input_api.files = [
            MockAffectedFile('file_blink.h', diff_file_blink_h),
            MockAffectedFile('file_chromium.h', diff_file_chromium_h),
            MockAffectedFile('web_tests/TestExpectations',
                             diff_file_test_expectations)
        ]
        # Access to a protected member _CheckStyle
        # pylint: disable=W0212
        PRESUBMIT._CheckStyle(mock_input_api, MockOutputApi())
        capture = Capture()
        # pylint: disable=E1101
        subprocess.Popen.assert_called_with(capture, stderr=-1)
        self.assertEqual(6, len(capture.value))
        self.assertEqual('../../file_blink.h', capture.value[3])
        self.assertEqual('../../web_tests/TestExpectations', capture.value[5])
This verifies that CheckChangeOnUpload will only call
        check_blink_style.py on non-test files.
        
This verifies that CheckChangeOnUpload will only call
check_blink_style.py on non-test files.
This verifies that CheckChangeOnUpload will only call check_blink_style . py on non - test files .
def testCheckChangeOnUploadWithBlinkAndChromiumFiles(self, _):
        diff_file_blink_h = ['some diff']
        diff_file_chromium_h = ['another diff']
        diff_file_test_expectations = ['more diff']
        mock_input_api = MockInputApi()
        mock_input_api.files = [
            MockAffectedFile('file_blink.h', diff_file_blink_h),
            MockAffectedFile('file_chromium.h', diff_file_chromium_h),
            MockAffectedFile('web_tests/TestExpectations',
                             diff_file_test_expectations)
        ]
        PRESUBMIT._CheckStyle(mock_input_api, MockOutputApi())
        capture = Capture()
        subprocess.Popen.assert_called_with(capture, stderr=-1)
        self.assertEqual(6, len(capture.value))
        self.assertEqual('../../file_blink.h', capture.value[3])
        self.assertEqual('../../web_tests/TestExpectations', capture.value[5])
def testCheckChangeOnUploadWithBlinkAndChromiumFiles ( self , _ ) : diff_file_blink_h = [ 'some diff' ] diff_file_chromium_h = [ 'another diff' ] diff_file_test_expectations = [ 'more diff' ] mock_input_api = MockInputApi ( ) mock_input_api . files = [ MockAffectedFile ( 'file_blink.h' , diff_file_blink_h ) , MockAffectedFile ( 'file_chromium.h' , diff_file_chromium_h ) , MockAffectedFile ( 'web_tests/TestExpectations' , diff_file_test_expectations ) ] PRESUBMIT . _CheckStyle ( mock_input_api , MockOutputApi ( ) ) capture = Capture ( ) subprocess . Popen . assert_called_with ( capture , stderr = - 1 ) self . assertEqual ( 6 , len ( capture . value ) ) self . assertEqual ( '../../file_blink.h' , capture . value [ 3 ] ) self . assertEqual ( '../../web_tests/TestExpectations' , capture . value [ 5 ] )
This verifies that CheckChangeOnUpload will only call
check_blink_style.py on non-test files.
This verifies that CheckChangeOnUpload will only call check_blink_style . py on non - test files .
"""This verifies that CheckChangeOnUpload will only call
        check_blink_style.py on non-test files.
        """ # Access to a protected member _CheckStyle # pylint: disable=W0212 # pylint: disable=E1101
self
_