We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5156f46 commit fdf2d50Copy full SHA for fdf2d50
Lib/test/test_capi/test_file.py
@@ -169,7 +169,13 @@ def test_pyfile_newstdprinter(self):
169
170
filename = os_helper.TESTFN
171
self.addCleanup(os_helper.unlink, filename)
172
- old_stdout = os.dup(STDOUT_FD)
+
173
+ try:
174
+ old_stdout = os.dup(STDOUT_FD)
175
+ except OSError as exc:
176
+ # os.dup(STDOUT_FD) is not supported on WASI
177
+ self.skipTest(f"os.dup() failed with {exc!r}")
178
179
try:
180
with open(filename, "wb") as fp:
181
# PyFile_NewStdPrinter() only accepts fileno(stdout)
0 commit comments