diff --git a/conformance/results/mypy/version.toml b/conformance/results/mypy/version.toml index 867a79fe..b72d4180 100644 --- a/conformance/results/mypy/version.toml +++ b/conformance/results/mypy/version.toml @@ -1,2 +1 @@ version = "mypy 1.17.1" -test_duration = 2.04 diff --git a/conformance/results/pyright/version.toml b/conformance/results/pyright/version.toml index 7e373c1a..ec4415b1 100644 --- a/conformance/results/pyright/version.toml +++ b/conformance/results/pyright/version.toml @@ -1,2 +1 @@ version = "pyright 1.1.403" -test_duration = 1.83 diff --git a/conformance/results/results.html b/conformance/results/results.html index 40ce04d0..151069d7 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -159,16 +159,12 @@
mypy 1.17.1
-2.0sec
|
pyright 1.1.403
-1.3sec
|
pyre 0.9.25
-10.2sec
|
zuban 0.0.19
-0.32sec
|
||
---|---|---|---|---|---|
diff --git a/conformance/results/zuban/version.toml b/conformance/results/zuban/version.toml index d3d2104d..9f28f9ef 100644 --- a/conformance/results/zuban/version.toml +++ b/conformance/results/zuban/version.toml @@ -1,2 +1 @@ version = "zuban 0.0.19" -test_duration = 0.32 diff --git a/conformance/src/main.py b/conformance/src/main.py index 484688b7..4b8a683d 100644 --- a/conformance/src/main.py +++ b/conformance/src/main.py @@ -22,7 +22,6 @@ def run_tests( root_dir: Path, type_checker: TypeChecker, test_cases: Sequence[Path], - skip_timing: bool = False, ): print(f"Running tests for {type_checker.name}") @@ -30,6 +29,8 @@ def run_tests( tests_output = type_checker.run_tests([file.name for file in test_cases]) test_duration = time() - test_start_time + print(f"Completed tests for {type_checker.name} in {test_duration:.2f} seconds") + for _, output in tests_output.items(): type_checker.parse_errors(output.splitlines()) @@ -40,7 +41,7 @@ def run_tests( type_checker, results_dir, test_case, tests_output.get(test_case.name, "") ) - update_type_checker_info(type_checker, root_dir, test_duration, skip_timing=skip_timing) + update_type_checker_info(type_checker, root_dir) def get_expected_errors(test_case: Path) -> tuple[ @@ -217,9 +218,7 @@ def update_output_for_test( tomlkit.dump(existing_results, f) -def update_type_checker_info( - type_checker: TypeChecker, root_dir: Path, test_duration: float, skip_timing: bool = False -): +def update_type_checker_info(type_checker: TypeChecker, root_dir: Path): # Record the version of the type checker used for the latest run. version_file = root_dir / "results" / type_checker.name / "version.toml" @@ -234,8 +233,6 @@ def update_type_checker_info( existing_info = {} existing_info["version"] = type_checker.get_version() - if not skip_timing: - existing_info["test_duration"] = round(test_duration, 2) version_file.parent.mkdir(parents=True, exist_ok=True) with open(version_file, "w") as f: @@ -266,7 +263,7 @@ def main(): if not type_checker.install(): print(f"Skipping tests for {type_checker.name}") else: - run_tests(root_dir, type_checker, test_cases, skip_timing=options.skip_timing) + run_tests(root_dir, type_checker, test_cases) # Generate a summary report. generate_summary(root_dir) diff --git a/conformance/src/options.py b/conformance/src/options.py index 93caef02..89120774 100644 --- a/conformance/src/options.py +++ b/conformance/src/options.py @@ -9,7 +9,6 @@ @dataclass class _Options: report_only: bool | None - skip_timing: bool def parse_options(argv: list[str]) -> _Options: @@ -20,10 +19,5 @@ def parse_options(argv: list[str]) -> _Options: action="store_true", help="regenerates the test suite report from past results", ) - reporting_group.add_argument( - "--skip-timing", - action="store_true", - help="do not update timing information in the output files", - ) ret = _Options(**vars(parser.parse_args(argv))) return ret diff --git a/conformance/src/reporting.py b/conformance/src/reporting.py index c1768724..cff2dc46 100644 --- a/conformance/src/reporting.py +++ b/conformance/src/reporting.py @@ -46,15 +46,8 @@ def generate_summary_html(root_dir: Path) -> str: existing_info = {} version = existing_info["version"] or "Unknown version" - test_duration = existing_info.get("test_duration") summary_html.append(f" | {version} ")
- if test_duration is not None:
- if test_duration < 1:
- duration = f"{test_duration:.2f}"
- else:
- duration = f"{test_duration:.1f}"
- summary_html.append(f"{duration}sec ")
summary_html.append(" | ")
summary_html.append("