diff --git a/.gitignore b/.gitignore index cdf405b6c..68aa74947 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ /.cache /.gdbinit /.python-version +/.pyodide-xbuildenv-* /Mathics.egg-info /Mathics3.egg-info ChangeLog diff --git a/test/builtin/files_io/test_files.py b/test/builtin/files_io/test_files.py index 7042a728b..c4cd469dd 100644 --- a/test/builtin/files_io/test_files.py +++ b/test/builtin/files_io/test_files.py @@ -99,6 +99,10 @@ def test_close(): ), f"temporary filename {temp_filename} should not appear" +@pytest.mark.skipif( + sys.platform in ("emscripten",), + reason="Pyodide has restricted filesystem access", +) @pytest.mark.parametrize( ("str_expr", "msgs", "str_expected", "fail_msg"), [ diff --git a/test/builtin/test_datentime.py b/test/builtin/test_datentime.py index 0fc894483..01583ecfd 100644 --- a/test/builtin/test_datentime.py +++ b/test/builtin/test_datentime.py @@ -11,7 +11,7 @@ @pytest.mark.skipif( - sys.platform in ("win32",) or hasattr(sys, "pyston_version_info"), + sys.platform in ("win32", "emscripten") or hasattr(sys, "pyston_version_info"), reason="TimeConstrained needs to be rewritten", ) def test_timeremaining(): diff --git a/test/test_main.py b/test/test_main.py index 982e593e1..dd5671e2b 100644 --- a/test/test_main.py +++ b/test/test_main.py @@ -2,6 +2,9 @@ import os.path as osp import re import subprocess +import sys + +import pytest def get_testdir(): @@ -9,6 +12,10 @@ def get_testdir(): return osp.realpath(filename) +@pytest.mark.skipif( + sys.platform in ("emscripten",), + reason="Pyodide does not support processes", +) def test_cli(): script_file = osp.join(get_testdir(), "data", "script.m") diff --git a/test/test_returncode.py b/test/test_returncode.py index a1eb67dc8..1e1d11abb 100644 --- a/test/test_returncode.py +++ b/test/test_returncode.py @@ -1,6 +1,9 @@ # -*- coding: utf-8 -*- import os.path as osp import subprocess +import sys + +import pytest def get_testdir(): @@ -8,6 +11,10 @@ def get_testdir(): return osp.realpath(filename) +@pytest.mark.skipif( + sys.platform in ("emscripten",), + reason="Pyodide does not support processes", +) def test_returncode(): assert subprocess.run(["mathics", "-e", "Quit[5]"]).returncode == 5 assert subprocess.run(["mathics", "-e", "1 + 2'"]).returncode == 0