diff --git a/test/builtin/files_io/test_importexport.py b/test/builtin/files_io/test_importexport.py index f51c38dfe..2d2cfd91a 100644 --- a/test/builtin/files_io/test_importexport.py +++ b/test/builtin/files_io/test_importexport.py @@ -8,6 +8,7 @@ import pytest from mathics.builtin.atomic.strings import to_python_encoding +from mathics.core.systemsymbols import SymbolFailed # def test_import(): # eaccent = "\xe9" @@ -260,6 +261,16 @@ def test_private_doctests_importexport(str_expr, msgs, str_expected, fail_msg): ) +def test_inividually(): + with tempfile.NamedTemporaryFile(mode="w", suffix=".jcp") as tmp: + filename = osp.join(tmp.name, "123.jcp") + expr = f'Export["{filename}", 1+x,' + "{}]" + result = evaluate(expr) + outs = [out.text for out in session.evaluation.out] + assert result == SymbolFailed + assert outs == [f"Cannot infer format of file {filename}."] + + # TODO: # mmatera: please put in pytest conditionally # >> System`Convert`B64Dump`B64Encode["∫ f  x"]