third_party/blink/tools/blinkpy/web_tests/stale_expectation_removal/data_types_unittest.py
def testNeverNeededExpectationMixedSlowExpectation(self):
        """Tests that special logic is used for mixed Slow expectations."""
        expectation = data_types.WebTestExpectation('foo', ['debug'],
                                                    ['Slow', 'Failure'])
        stats = data_types.WebTestBuildStats()
        # This should only return true if there are no slow builds AND there
        # are no failed builds.
        stats.AddPassedBuild()
        # Passed build, not slow.
        self.assertTrue(stats.NeverNeededExpectation(expectation))
        stats.AddSlowBuild('build_id')
        # Passed build, slow.
        self.assertFalse(stats.NeverNeededExpectation(expectation))
        stats = data_types.WebTestBuildStats()
        stats.AddFailedBuild('build_id')
        # Failed build, not slow.
        self.assertFalse(stats.NeverNeededExpectation(expectation))
        stats.AddSlowBuild('build_id')
        # Failed build, slow.
        self.assertFalse(stats.NeverNeededExpectation(expectation))
Tests that special logic is used for mixed Slow expectations.
Tests that special logic is used for mixed Slow expectations.
Tests that special logic is used for mixed Slow expectations .
def testNeverNeededExpectationMixedSlowExpectation(self):
        expectation = data_types.WebTestExpectation('foo', ['debug'],
                                                    ['Slow', 'Failure'])
        stats = data_types.WebTestBuildStats()
        stats.AddPassedBuild()
        self.assertTrue(stats.NeverNeededExpectation(expectation))
        stats.AddSlowBuild('build_id')
        self.assertFalse(stats.NeverNeededExpectation(expectation))
        stats = data_types.WebTestBuildStats()
        stats.AddFailedBuild('build_id')
        self.assertFalse(stats.NeverNeededExpectation(expectation))
        stats.AddSlowBuild('build_id')
        self.assertFalse(stats.NeverNeededExpectation(expectation))
def testNeverNeededExpectationMixedSlowExpectation ( self ) : expectation = data_types . WebTestExpectation ( 'foo' , [ 'debug' ] , [ 'Slow' , 'Failure' ] ) stats = data_types . WebTestBuildStats ( ) stats . AddPassedBuild ( ) self . assertTrue ( stats . NeverNeededExpectation ( expectation ) ) stats . AddSlowBuild ( 'build_id' ) self . assertFalse ( stats . NeverNeededExpectation ( expectation ) ) stats = data_types . WebTestBuildStats ( ) stats . AddFailedBuild ( 'build_id' ) self . assertFalse ( stats . NeverNeededExpectation ( expectation ) ) stats . AddSlowBuild ( 'build_id' ) self . assertFalse ( stats . NeverNeededExpectation ( expectation ) )
Tests that special logic is used for mixed Slow expectations.
Tests that special logic is used for mixed Slow expectations .
"""Tests that special logic is used for mixed Slow expectations.""" # This should only return true if there are no slow builds AND there # are no failed builds. # Passed build, not slow. # Passed build, slow. # Failed build, not slow. # Failed build, slow.
self