dev
This commit is contained in:
parent
14f7a8cda6
commit
be33126449
|
|
@ -280,22 +280,59 @@ class Test_Leak(Test_Test):
|
|||
|
||||
# TESTING
|
||||
if self.simulate:
|
||||
if "--fail-leak" in sys.argv:
|
||||
data[self.tester_component] = {
|
||||
"Running test: active phase": "WAITING START",
|
||||
"Running test: result": "-----TESTING----- fail",
|
||||
"Running test: filling pressure":"5000",
|
||||
"Running test: measured leak":"50",
|
||||
"Running test: pressure at the end of settling":"4999",
|
||||
}
|
||||
# Different simulation profiles for free-fall vs leak_1/leak_2
|
||||
is_free_fall = False
|
||||
try:
|
||||
is_free_fall = getattr(self.step, "step_type", None) == "test_freefall_leak"
|
||||
except Exception:
|
||||
# Fallback if step is a dict-like
|
||||
try:
|
||||
is_free_fall = (self.step.get("type") or self.step.get("step_type")) == "test_freefall_leak"
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if is_free_fall:
|
||||
# Free-fall requested values (distinct from leak_1)
|
||||
if "--fail-leak" in sys.argv:
|
||||
data[self.tester_component] = {
|
||||
"Running test: active phase": "WAITING START",
|
||||
"Running test: result": "-----TESTING----- fail",
|
||||
"Running test: filling pressure": 3000,
|
||||
"Running test: measured leak": 0,
|
||||
"Running test: pressure at the end of settling": 1831,
|
||||
"Running test: pressure at the end of measure": 1831,
|
||||
}
|
||||
else:
|
||||
data[self.tester_component] = {
|
||||
"Running test: active phase": "WAITING START",
|
||||
"Running test: result": "-----TESTING----- passed",
|
||||
"Running test: filling pressure": 3000,
|
||||
"Running test: measured leak": 0,
|
||||
"Running test: pressure at the end of settling": 1831,
|
||||
"Running test: pressure at the end of measure": 1831,
|
||||
}
|
||||
else:
|
||||
data[self.tester_component] = {
|
||||
"Running test: active phase": "WAITING START",
|
||||
"Running test: result": "-----TESTING----- passed",
|
||||
"Running test: filling pressure":"5000",
|
||||
"Running test: measured leak":"5",
|
||||
"Running test: pressure at the end of settling":"4999",
|
||||
}
|
||||
# Standard leak (leak_1/leak_2) simulation — keep distinct values
|
||||
if "--fail-leak" in sys.argv:
|
||||
data[self.tester_component] = {
|
||||
"Running test: active phase": "WAITING START",
|
||||
"Running test: result": "-----TESTING----- fail",
|
||||
# Legacy simulation values for fail
|
||||
"Running test: filling pressure": 5000,
|
||||
"Running test: measured leak": 50,
|
||||
"Running test: pressure at the end of settling": 4999,
|
||||
# Let end-of-measure be derived by saver when possible
|
||||
}
|
||||
else:
|
||||
data[self.tester_component] = {
|
||||
"Running test: active phase": "WAITING START",
|
||||
"Running test: result": "-----TESTING----- passed",
|
||||
# Legacy simulation values for pass
|
||||
"Running test: filling pressure": 5000,
|
||||
"Running test: measured leak": 5,
|
||||
"Running test: pressure at the end of settling": 4999,
|
||||
# Let end-of-measure be derived by saver when possible
|
||||
}
|
||||
|
||||
if "Running test: result" in data[self.tester_component]:
|
||||
# TEST ENDED, CHECK RESULT
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user