Make sure each test gets its own cache

by appending testfunction-name to cache_path
This commit is contained in:
Thor77 2018-02-01 21:01:01 +01:00
parent ab99c5f64c
commit af608f175f
1 changed files with 3 additions and 1 deletions

View File

@ -13,7 +13,9 @@ from tsstats.tests.test_log import testlog_path
@pytest.fixture
def cache_path(request):
cache_path = 'tsstats/tests/res/tsstats.cache'
cache_path = 'tsstats/tests/res/tsstats.cache.{}'.format(
request.function.__name__
)
def clean():
if os.path.exists(cache_path):