content/test/gpu/unexpected_passes/gpu_queries_unittest.py
def testSuiteExceptionMap(self):
    """Tests that the suite passed to the query changes for some suites."""

    def assertSuiteInQuery(suite, call_args):
      query = call_args[0][0][0]
      s = 'r"gpu_tests\\.%s\\."' % suite
      self.assertIn(s, query)

    # Non-special cased suite.
    querier = gpu_uu.CreateGenericGpuQuerier()
    with mock.patch.object(querier,
                           '_RunBigQueryCommandsForJsonOutput') as query_mock:
      _ = querier.QueryBuilder('builder', 'ci')
      assertSuiteInQuery('pixel_integration_test', query_mock.call_args)

    # Special-cased suites.
    querier = gpu_uu.CreateGenericGpuQuerier(suite='info_collection')
    with mock.patch.object(querier,
                           '_RunBigQueryCommandsForJsonOutput') as query_mock:
      _ = querier.QueryBuilder('builder', 'ci')
      assertSuiteInQuery('info_collection_test', query_mock.call_args)

    querier = gpu_uu.CreateGenericGpuQuerier(suite='power')
    with mock.patch.object(querier,
                           '_RunBigQueryCommandsForJsonOutput') as query_mock:
      _ = querier.QueryBuilder('builder', 'ci')
      assertSuiteInQuery('power_measurement_integration_test',
                         query_mock.call_args)

    querier = gpu_uu.CreateGenericGpuQuerier(suite='trace_test')
    with mock.patch.object(querier,
                           '_RunBigQueryCommandsForJsonOutput') as query_mock:
      _ = querier.QueryBuilder('builder', 'ci')
      assertSuiteInQuery('trace_integration_test', query_mock.call_args)
Tests that the suite passed to the query changes for some suites.
Tests that the suite passed to the query changes for some suites.
Tests that the suite passed to the query changes for some suites .
def testSuiteExceptionMap(self):
    def assertSuiteInQuery(suite, call_args):
      query = call_args[0][0][0]
      s = 'r"gpu_tests\\.%s\\."' % suite
      self.assertIn(s, query)
    querier = gpu_uu.CreateGenericGpuQuerier()
    with mock.patch.object(querier,
                           '_RunBigQueryCommandsForJsonOutput') as query_mock:
      _ = querier.QueryBuilder('builder', 'ci')
      assertSuiteInQuery('pixel_integration_test', query_mock.call_args)
    querier = gpu_uu.CreateGenericGpuQuerier(suite='info_collection')
    with mock.patch.object(querier,
                           '_RunBigQueryCommandsForJsonOutput') as query_mock:
      _ = querier.QueryBuilder('builder', 'ci')
      assertSuiteInQuery('info_collection_test', query_mock.call_args)
    querier = gpu_uu.CreateGenericGpuQuerier(suite='power')
    with mock.patch.object(querier,
                           '_RunBigQueryCommandsForJsonOutput') as query_mock:
      _ = querier.QueryBuilder('builder', 'ci')
      assertSuiteInQuery('power_measurement_integration_test',
                         query_mock.call_args)
    querier = gpu_uu.CreateGenericGpuQuerier(suite='trace_test')
    with mock.patch.object(querier,
                           '_RunBigQueryCommandsForJsonOutput') as query_mock:
      _ = querier.QueryBuilder('builder', 'ci')
      assertSuiteInQuery('trace_integration_test', query_mock.call_args)
def testSuiteExceptionMap ( self ) : def assertSuiteInQuery ( suite , call_args ) : query = call_args [ 0 ] [ 0 ] [ 0 ] s = 'r"gpu_tests\\.%s\\."' % suite self . assertIn ( s , query ) querier = gpu_uu . CreateGenericGpuQuerier ( ) with mock . patch . object ( querier , '_RunBigQueryCommandsForJsonOutput' ) as query_mock : _ = querier . QueryBuilder ( 'builder' , 'ci' ) assertSuiteInQuery ( 'pixel_integration_test' , query_mock . call_args ) querier = gpu_uu . CreateGenericGpuQuerier ( suite = 'info_collection' ) with mock . patch . object ( querier , '_RunBigQueryCommandsForJsonOutput' ) as query_mock : _ = querier . QueryBuilder ( 'builder' , 'ci' ) assertSuiteInQuery ( 'info_collection_test' , query_mock . call_args ) querier = gpu_uu . CreateGenericGpuQuerier ( suite = 'power' ) with mock . patch . object ( querier , '_RunBigQueryCommandsForJsonOutput' ) as query_mock : _ = querier . QueryBuilder ( 'builder' , 'ci' ) assertSuiteInQuery ( 'power_measurement_integration_test' , query_mock . call_args ) querier = gpu_uu . CreateGenericGpuQuerier ( suite = 'trace_test' ) with mock . patch . object ( querier , '_RunBigQueryCommandsForJsonOutput' ) as query_mock : _ = querier . QueryBuilder ( 'builder' , 'ci' ) assertSuiteInQuery ( 'trace_integration_test' , query_mock . call_args )
Tests that the suite passed to the query changes for some suites.
Tests that the suite passed to the query changes for some suites .
"""Tests that the suite passed to the query changes for some suites.""" # Non-special cased suite. # Special-cased suites.
self