djLint/tests/conftest.py

19 lines
271 B
Python
Raw Normal View History

2021-07-13 17:45:25 +00:00
import os
2021-07-13 15:45:57 +00:00
import tempfile
import pytest
from click.testing import CliRunner
@pytest.fixture
def runner():
yield CliRunner()
@pytest.fixture
def tmp_file():
2021-07-13 17:45:25 +00:00
tmp = tempfile.NamedTemporaryFile(delete=False)
yield tmp
2021-07-13 17:53:19 +00:00
tmp.close()
2021-07-13 17:45:25 +00:00
os.unlink(tmp.name)