28 lines
499 B
Python
28 lines
499 B
Python
"""Pytest configuration and fixtures."""
|
|
|
|
import pytest
|
|
import tempfile
|
|
from pathlib import Path
|
|
|
|
|
|
@pytest.fixture
|
|
def test_files(tmp_path):
|
|
"""Create temporary test files."""
|
|
test_dir = tmp_path / "test_project"
|
|
test_dir.mkdir()
|
|
|
|
(test_dir / "test.py").write_text("""
|
|
def hello():
|
|
# TODO: implement
|
|
print("Hello, World!")
|
|
""")
|
|
|
|
(test_dir / "test.js").write_text("""
|
|
function hello() {
|
|
// FIXME: fix this
|
|
console.log("Hello, World!");
|
|
}
|
|
""")
|
|
|
|
return test_dir
|