prod
This commit is contained in:
parent
d596ed7e19
commit
aa6626d80d
21 changed files with 1051 additions and 333 deletions
27
tests/test_autoclean.py
Normal file
27
tests/test_autoclean.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import pytest
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from datetime import datetime, timedelta
|
||||
sys.path.append(str(Path(__file__).parent.parent))
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def temp_data_dir(tmp_path):
|
||||
"""Create a temporary data directory with test files."""
|
||||
data_dir = tmp_path / "data"
|
||||
data_dir.mkdir()
|
||||
return data_dir
|
||||
|
||||
|
||||
def test_autoclean_script_exists():
|
||||
"""Test that the autoclean script exists and is valid Python."""
|
||||
script_path = Path(__file__).parent.parent / "autoclean_debug.py"
|
||||
assert script_path.exists()
|
||||
|
||||
# Verify it's valid Python
|
||||
with open(script_path, 'r', encoding='utf-8') as f:
|
||||
code = f.read()
|
||||
try:
|
||||
compile(code, 'autoclean_debug.py', 'exec')
|
||||
except SyntaxError as e:
|
||||
pytest.fail(f"Syntax error in autoclean_debug.py: {e}")
|
||||
Loading…
Add table
Add a link
Reference in a new issue