Files
apocalypse/tests/apo/test_apocalypse.py
woznic_n 177d8777c1
All checks were successful
Run apocalypse tests / Explore-Gitea-Actions (push) Successful in 10s
first commit
2025-09-08 18:53:14 +02:00

21 lines
432 B
Python

# pylint:disable=missing-function-docstring
import tempfile
import uuid
from pathlib import Path
import pytest
from apo import file_written
@pytest.fixture
def temp_dir():
with tempfile.TemporaryDirectory() as directory:
yield directory
def test_file_written_raise_err(temp_dir):
with pytest.raises(SystemExit):
pth = Path(temp_dir).joinpath(f"does_not_exist_{uuid.uuid4()}")
file_written(pth)