diff --git a/conformance/README.md b/conformance/README.md index a0a82135..7abe0c43 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -60,7 +60,8 @@ To run the conformance test suite: * Switch to the `conformance` subdirectory and install all dependencies (`pip install -r requirements.txt`). * Switch to the `src` subdirectory and run `python main.py`. -Note that some type checkers may not run on some platforms. If a type checker fails to install, tests will be skipped for that type checker. +Note that some type checkers may not run on some platforms. If a type checker fails to install, tests will be skipped for that type checker. +Currently, the only unsupported type checker is Pyre on Windows. ## Reporting Conformance Results diff --git a/conformance/requirements.txt b/conformance/requirements.txt index d4c4d5a8..f4dafc20 100644 --- a/conformance/requirements.txt +++ b/conformance/requirements.txt @@ -4,5 +4,5 @@ tqdm pyright mypy pip -pyre-check +pyre-check; platform_system != "Windows" pytype diff --git a/conformance/src/main.py b/conformance/src/main.py index 3f4b1297..0c8a3b5a 100644 --- a/conformance/src/main.py +++ b/conformance/src/main.py @@ -197,7 +197,7 @@ def update_output_for_test( notes = "\n" + notes existing_results["notes"] = tomlkit.string(notes, multiline=True) results_file.parent.mkdir(parents=True, exist_ok=True) - with open(results_file, "w") as f: + with open(results_file, "w", encoding="utf-8") as f: tomlkit.dump(existing_results, f) diff --git a/conformance/src/type_checker.py b/conformance/src/type_checker.py index d5ee0dfa..05f4485a 100644 --- a/conformance/src/type_checker.py +++ b/conformance/src/type_checker.py @@ -387,6 +387,6 @@ def parse_errors(self, output: Sequence[str]) -> dict[int, list[str]]: TYPE_CHECKERS: Sequence[TypeChecker] = ( MypyTypeChecker(), PyrightTypeChecker(), - PyreTypeChecker(), + *([] if os.name == "nt" else [PyreTypeChecker()]), PytypeTypeChecker(), )