mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-18 23:07:07 -05:00
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:
2 files changed
+2
-2
No files matched your search
@@ -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)
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user