Skip to content

Commit 4fa142e

Browse files
authored
Fix validators documentation (#926)
* Fix validators documentation * Update validators.py * Update json_factory.py
1 parent 195d005 commit 4fa142e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

openhtf/output/callbacks/json_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class OutputToJSON(callbacks.OutputToFile):
2727
'/data/test_records/%(dut_id)s.%(start_time_millis)s'
2828
To use this output mechanism:
2929
test = openhtf.Test(PhaseOne, PhaseTwo)
30-
test.add_output_callback(openhtf.output.callbacks.OutputToJson(
30+
test.add_output_callback(openhtf.output.callbacks.OutputToJSON(
3131
'/data/test_records/{dut_id}.{metadata[test_name]}.json'))
3232
3333
Args:

openhtf/util/validators.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
module, and will typically be a type, instances of which are callable:
66
77
from openhtf.util import validators
8-
from openhtf.util import measurements
98
10-
class MyLessThanValidator(ValidatorBase):
9+
class MyLessThanValidator(validators.ValidatorBase):
1110
def __init__(self, limit):
1211
self.limit = limit
1312
@@ -35,7 +34,7 @@ def LessThan4(value):
3534
return value < 4
3635
3736
@measurements.measures(
38-
measurements.Measurement('my_measurement).with_validator(LessThan4))
37+
measurements.Measurement('my_measurement').with_validator(LessThan4))
3938
def MyPhase(test):
4039
test.measurements.my_measurement = 5 # Will also 'FAIL'
4140

0 commit comments

Comments
 (0)