All checks were successful
Run apocalypse tests / Explore-Gitea-Actions (push) Successful in 10s
21 lines
432 B
Python
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)
|