Lines Matching +full:fail +full:- +full:safe
3 # Copyright (c) 2020-2021 Virtuozzo International GmbH
34 def silent_unlink(path: Path) -> None:
41 def file_diff(file1: str, file2: str) -> List[str]:
42 with open(file1, encoding="utf-8") as f1, \
43 open(file2, encoding="utf-8") as f2:
58 It is safe to use get() at any time. To use update(), you must either
59 use it inside with-block or use save() after update().
61 def __init__(self, cache_file: str, env: TestEnv) -> None:
67 with open(cache_file, encoding="utf-8") as f:
73 default: Optional[float] = None) -> Optional[float]:
83 def update(self, test: str, elapsed: float) -> None:
87 def save(self) -> None:
88 with open(self.cache_file, 'w', encoding="utf-8") as f:
91 def __enter__(self) -> 'LastElapsedTime':
94 def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None:
101 casenotrun: str = '', interrupted: bool = False) -> None:
114 def proc_run_test(test: str, test_field_width: int) -> TestResult:
121 test_field_width: int, jobs: int) -> List[TestResult]:
137 color: str = 'auto') -> None:
140 self.last_elapsed = LastElapsedTime('.last-elapsed-cache', env)
148 def __enter__(self) -> 'TestRunner':
154 def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None:
164 end: str = '\n') -> None:
174 elif status == 'fail':
197 elif status == 'fail':
213 def find_reference(self, test: str) -> str:
229 def do_run_test(self, test: str) -> TestResult:
243 return TestResult(status='fail',
262 f"{self.env.imgfmt}-{self.env.imgproto}-{f_test.name}")
274 with f_bad.open('w', encoding="utf-8") as f:
288 elapsed = round(time.time() - t0, 1)
291 return TestResult(status='fail', elapsed=elapsed,
298 description=f_notrun.read_text(encoding='utf-8').strip())
302 casenotrun = f_casenotrun.read_text(encoding='utf-8')
311 return TestResult(status='fail', elapsed=elapsed,
321 mp: bool = False) -> TestResult:
367 def run_tests(self, tests: List[str], jobs: int = 1) -> bool:
393 assert res.status in ('pass', 'fail', 'not run')
401 if res.status == 'fail':