Merge pull request #5628 from thuanquang/test/tools-python39-remaining

test(tools): simulate cp1252 and write LF fixtures on Python 3.9
This commit is contained in:
Adrià authored and GitHub committed 2026-10-15 13:30:06 +02:00
commit 7b8b8a9256
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ def simulated_cp1252():
wrapper = io.TextIOWrapper
def fake_wrapper(buffer, encoding=None, *args, **kwargs):
if encoding == "locale":
if encoding in (None, "locale"):
encoding = "cp1252"
return wrapper(buffer, encoding=encoding, *args, **kwargs)
+1 -1
View File
@@ -11,7 +11,7 @@ class StubgenStdoutNewlineTests(unittest.TestCase):
def run_stubgen(self, *extra):
with tempfile.TemporaryDirectory() as d:
nids = Path(d) / "nids.txt"
nids.write_text("AC1FtjqMCL0\n", encoding="utf-8", newline="\n")
nids.write_bytes(b"AC1FtjqMCL0\n")
return subprocess.run(
[sys.executable, str(tools / "stubgen.py"), "--module", "libkernel", "--nids", str(nids)] + list(extra),
capture_output=True,