pyodide/pyodide-build/pyodide_build/tests/fixture.py

23 lines
487 B
Python
Raw Normal View History

from pathlib import Path
import pytest
@pytest.fixture(scope="module")
def temp_python_lib(tmp_path_factory):
libdir = tmp_path_factory.mktemp("python")
path = Path(libdir)
(path / "test").mkdir()
(path / "test" / "test_blah.py").touch()
(path / "distutils").mkdir()
(path / "turtle.py").touch()
(path / "module1.py").touch()
(path / "module2.py").touch()
(path / "hello_pyodide.py").write_text("def hello(): return 'hello'")
yield libdir