1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 from telemetry
.value
import failure
6 from telemetry
.value
import skip
9 class StoryRun(object):
10 def __init__(self
, story
):
14 def AddValue(self
, value
):
15 self
._values
.append(value
)
23 """The values that correspond to this story run."""
28 """Whether the current run is still ok.
30 To be precise: returns true if there is neither FailureValue nor
31 SkipValue in self.values.
33 return not self
.skipped
and not self
.failed
37 """Whether the current run is being skipped.
39 To be precise: returns true if there is any SkipValue in self.values.
41 return any(isinstance(v
, skip
.SkipValue
) for v
in self
.values
)
45 """Whether the current run failed.
47 To be precise: returns true if there is a FailureValue but not
48 SkipValue in self.values.
50 return not self
.skipped
and any(
51 isinstance(v
, failure
.FailureValue
) for v
in self
.values
)