Skip to content

Commit 6cf568e

Browse files
Skip file system access tests on WASM
1 parent 47f48a6 commit 6cf568e

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

pandas/tests/io/parser/common/test_file_buffer_url.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def test_path_path_lib(all_parsers):
7979
tm.assert_frame_equal(df, result)
8080

8181

82+
@td.skip_if_wasm # limited file system access on WASM
8283
def test_nonexistent_path(all_parsers):
8384
# gh-2428: pls no segfault
8485
# gh-14086: raise more helpful FileNotFoundError

pandas/tests/io/parser/test_c_parser_only.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ def test_chunk_whitespace_on_boundary(c_parser_only):
549549
tm.assert_frame_equal(result, expected)
550550

551551

552+
@td.skip_if_wasm # limited file system access on WASM
552553
def test_file_handles_mmap(c_parser_only, csv1):
553554
# gh-14418
554555
#

pandas/tests/io/test_common.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import pandas as pd
2424
import pandas._testing as tm
25+
import pandas.util._test_decorators as td
2526

2627
import pandas.io.common as icom
2728

@@ -162,6 +163,7 @@ def test_iterator(self):
162163
tm.assert_frame_equal(first, expected.iloc[[0]])
163164
tm.assert_frame_equal(pd.concat(it), expected.iloc[1:])
164165

166+
@td.skip_if_wasm # limited file system access on WASM
165167
@pytest.mark.parametrize(
166168
"reader, module, error_class, fn_ext",
167169
[
@@ -227,6 +229,8 @@ def test_write_missing_parent_directory(self, method, module, error_class, fn_ex
227229
):
228230
method(dummy_frame, path)
229231

232+
233+
@td.skip_if_wasm # limited file system access on WASM
230234
@pytest.mark.parametrize(
231235
"reader, module, error_class, fn_ext",
232236
[
@@ -381,6 +385,7 @@ def mmap_file(datapath):
381385

382386

383387
class TestMMapWrapper:
388+
@td.skip_if_wasm # limited file system access on WASM
384389
def test_constructor_bad_file(self, mmap_file):
385390
non_file = StringIO("I am not a file")
386391
non_file.fileno = lambda: -1
@@ -585,7 +590,7 @@ def test_bad_encdoing_errors():
585590
with pytest.raises(LookupError, match="unknown error handler name"):
586591
icom.get_handle(path, "w", errors="bad")
587592

588-
593+
@td.skip_if_wasm # limited file system access on WASM
589594
def test_errno_attribute():
590595
# GH 13872
591596
with pytest.raises(FileNotFoundError, match="\\[Errno 2\\]") as err:

pandas/tests/io/xml/test_xml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def test_empty_string_etree(val):
484484
with pytest.raises(ParseError, match="no element found"):
485485
read_xml(data, parser="etree")
486486

487-
487+
@td.skip_if_wasm # limited file system access on WASM
488488
def test_wrong_file_path(parser):
489489
filename = os.path.join("does", "not", "exist", "books.xml")
490490

0 commit comments

Comments
 (0)