Lines Matching +full:python +full:- +full:version

19 sys.path.insert(0, str(Path(__file__).parent / "junit-xml"))
65 csv_rtol: float = -1
66 csv_ztol: float = -1
67 cgns_tol: float = -1
88 def get_source_path(self, test: str) -> Path:
100 def get_run_path(self, test: str) -> Path:
112 def get_output_path(self, test: str, output_file: str) -> Path:
125 def test_failure_artifacts_path(self) -> Path:
132 return getattr(self, '_cgns_tol', 1.0e-12)
141 return getattr(self, '_csv_ztol', 3e-10)
150 return getattr(self, '_csv_rtol', 1e-6)
157 def csv_comment_diff_fn(self): # -> Any | Callable[..., None]:
172 def post_test_hook(self, test: str, spec: TestSpec, backend: str) -> None:
181 def check_pre_skip(self, test: str, spec: TestSpec, resource: str, nproc: int) -> Optional[str]:
195 … def check_post_skip(self, test: str, spec: TestSpec, resource: str, stderr: str) -> Optional[str]:
209 …def check_required_failure(self, test: str, spec: TestSpec, resource: str, stderr: str) -> Tuple[s…
223 def check_allowed_stdout(self, test: str) -> bool:
235 def has_cgnsdiff() -> bool:
247 return 'not found' not in proc.stderr.decode('utf-8')
250 def contains_any(base: str, substrings: List[str]) -> bool:
263 def startswith_any(base: str, prefixes: List[str]) -> bool:
276 def find_matching(line: str, open: str = '(', close: str = ')') -> Tuple[int, int]:
297 return -1, -1
303 count -= 1
306 return start, -1
309 def parse_test_line(line: str, fallback_name: str = '') -> TestSpec:
331 …([A-Za-z]+[\w\-]+) # match key starting with alpha, containing alphanumeric, _, or -; captured as…
350 # TODO: stop supporting python <=3.8
375 def get_test_args(source_file: Path) -> List[TestSpec]:
405 …comment_str: str = '#', comment_func: Optional[Callable[[str, str], Optional[str]]] = None) -> str:
412 rel_tol (float): Relative tolerance for comparing non-zero values.
481 def diff_cgns(test_cgns: Path, true_cgns: Path, cgns_tol: float) -> str:
487 cgns_tol (float): Tolerance for comparing floating-point values
494 run_args: List[str] = ['cgnsdiff', '-d', '-t', f'{cgns_tol}', str(test_cgns), str(true_cgns)]
501 return proc.stderr.decode('utf-8') + proc.stdout.decode('utf-8')
504 def diff_ascii(test_file: Path, true_file: Path, backend: str) -> str:
514 tmp_backend: str = backend.replace('/', '-')
524 backend: str, test: str, index: int, verbose: bool) -> str:
529 …output_str += f' ok {index} - {spec.name}, {backend} # SKIP {test_case.skipped[0]["message"]}\n'
531 … output_str += f' not ok {index} - {spec.name}, {backend} ({test_case.elapsed_sec} s)\n'
533 output_str += f' ok {index} - {spec.name}, {backend} ({test_case.elapsed_sec} s)\n'
535 output_str += f' ---\n'
552 output_str += f' -\n'
573 def save_failure_artifact(suite_spec: SuiteSpec, file: Path) -> Path:
586 mode: RunMode, nproc: int, suite_spec: SuiteSpec, verbose: bool = False) -> TestCase:
609 run_args[i] = arg.replace('{ceed_resource}', backend.replace('/', '-'))
613 run_args = ['mpiexec', '-n', f'{nproc}', *run_args]
620 … timestamp=time.strftime('%Y-%m-%d %H:%M:%S %Z', time.localtime()),
635 elapsed_sec=time.time() - start,
636 timestamp=time.strftime('%Y-%m-%d %H:%M:%S %Z', time.localtime(start)),
637 stdout=proc.stdout.decode('utf-8'),
638 stderr=proc.stderr.decode('utf-8'),
769 …suite_spec: SuiteSpec, pool_size: int = 1, search: str = ".*", verbose: bool = False) -> TestSuite:
790 print('TAP version 13')
815 print(f'{"" if subtest_ok else "not "}ok {i} - {test_case.category}')
820 def write_junit_xml(test_suite: TestSuite, batch: str = '') -> None:
831 def has_failures(test_suite: TestSuite) -> bool: