prod
This commit is contained in:
parent
d596ed7e19
commit
aa6626d80d
21 changed files with 1051 additions and 333 deletions
37
tests/test_helper_functions.py
Normal file
37
tests/test_helper_functions.py
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import pytest
|
||||
import sys
|
||||
from pathlib import Path
|
||||
sys.path.append(str(Path(__file__).parent.parent))
|
||||
|
||||
|
||||
def test_merge_scripts_exist():
|
||||
"""Test that all merge helper scripts exist."""
|
||||
helper_dir = Path(__file__).parent.parent / "helper_functions"
|
||||
|
||||
assert (helper_dir / "merge_listing_times.py").exists()
|
||||
assert (helper_dir / "merge_applications.py").exists()
|
||||
assert (helper_dir / "merge_dict_json.py").exists()
|
||||
assert (helper_dir / "merge_wgcompany_times.py").exists()
|
||||
|
||||
|
||||
def test_merge_scripts_are_python_files():
|
||||
"""Test that all merge scripts are valid Python files."""
|
||||
helper_dir = Path(__file__).parent.parent / "helper_functions"
|
||||
|
||||
scripts = [
|
||||
"merge_listing_times.py",
|
||||
"merge_applications.py",
|
||||
"merge_dict_json.py",
|
||||
"merge_wgcompany_times.py"
|
||||
]
|
||||
|
||||
for script in scripts:
|
||||
script_path = helper_dir / script
|
||||
assert script_path.exists()
|
||||
# Verify it's a Python file by checking it can be compiled
|
||||
with open(script_path, 'r', encoding='utf-8') as f:
|
||||
code = f.read()
|
||||
try:
|
||||
compile(code, script, 'exec')
|
||||
except SyntaxError as e:
|
||||
pytest.fail(f"Syntax error in {script}: {e}")
|
||||
Loading…
Add table
Add a link
Reference in a new issue