File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class OutputToJSON(callbacks.OutputToFile):
27
27
'/data/test_records/%(dut_id)s.%(start_time_millis)s'
28
28
To use this output mechanism:
29
29
test = openhtf.Test(PhaseOne, PhaseTwo)
30
- test.add_output_callback(openhtf.output.callbacks.OutputToJson (
30
+ test.add_output_callback(openhtf.output.callbacks.OutputToJSON (
31
31
'/data/test_records/{dut_id}.{metadata[test_name]}.json'))
32
32
33
33
Args:
Original file line number Diff line number Diff line change 5
5
module, and will typically be a type, instances of which are callable:
6
6
7
7
from openhtf.util import validators
8
- from openhtf.util import measurements
9
8
10
- class MyLessThanValidator(ValidatorBase):
9
+ class MyLessThanValidator(validators. ValidatorBase):
11
10
def __init__(self, limit):
12
11
self.limit = limit
13
12
@@ -35,7 +34,7 @@ def LessThan4(value):
35
34
return value < 4
36
35
37
36
@measurements.measures(
38
- measurements.Measurement('my_measurement).with_validator(LessThan4))
37
+ measurements.Measurement('my_measurement' ).with_validator(LessThan4))
39
38
def MyPhase(test):
40
39
test.measurements.my_measurement = 5 # Will also 'FAIL'
41
40
You can’t perform that action at this time.
0 commit comments