Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanking13 committed Jul 2, 2024
1 parent 32ffcad commit e10d452
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
1 change: 0 additions & 1 deletion pyodide_build/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ def to_env(self) -> dict[str, str]:
# Other configuration
"pyodide_jobs": "1",
# maintainer only
"_pywasmcross_wrapper": "",
"_f2c_fixes_wrapper": "",
}

Expand Down
16 changes: 16 additions & 0 deletions pyodide_build/tests/test_pypabuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ def test_make_command_wrapper_symlinks(tmp_path):
assert key in pypabuild.SYMLINK_ENV_VARS.values()


def test_make_command_wrapper_symlinks_f2c_wrapper(tmp_path, reset_env_vars, reset_cache):
import os

dummy_f2c_wrapper = tmp_path / "_dummy_f2c_fixes.py"
dummy_f2c_wrapper.write_text("print('Hello, world!')")

os.environ["_F2C_FIXES_WRAPPER"] = str(dummy_f2c_wrapper)

symlink_dir = tmp_path
pypabuild.make_command_wrapper_symlinks(symlink_dir)

wrapper = symlink_dir / "_f2c_fixes.py"
assert wrapper.exists()
assert wrapper.read_text() == dummy_f2c_wrapper.read_text()


def test_get_build_env(tmp_path):
build_env_ctx = pypabuild.get_build_env(
env={"PATH": ""},
Expand Down

0 comments on commit e10d452

Please sign in to comment.