split up the tests

This commit is contained in:
Anthony Sottile
2019-12-14 13:31:08 -08:00
parent d826cfbea1
commit 230e457e79
22 changed files with 2086 additions and 2032 deletions

18
tests/conftest.py Normal file
View File

@@ -0,0 +1,18 @@
import os
from unittest import mock
import pytest
@pytest.fixture(autouse=True)
def xdg_data_home(tmpdir):
data_home = tmpdir.join('data_home')
with mock.patch.dict(os.environ, {'XDG_DATA_HOME': str(data_home)}):
yield data_home
@pytest.fixture
def ten_lines(tmpdir):
f = tmpdir.join('f')
f.write('\n'.join(f'line_{i}' for i in range(10)))
yield f