Use pathlib.Path instead of strings

This commit is contained in:
Dave Halter
2020-07-26 01:19:41 +02:00
parent 97c10facf7
commit ea6b01b968
5 changed files with 68 additions and 60 deletions

View File

@@ -3,6 +3,7 @@ import tempfile
import shutil
import logging
import os
from pathlib import Path
import pytest
@@ -28,7 +29,7 @@ def clean_parso_cache():
"""
old = cache._default_cache_path
tmp = tempfile.mkdtemp(prefix='parso-test-')
cache._default_cache_path = tmp
cache._default_cache_path = Path(str(tmp))
yield
cache._default_cache_path = old
shutil.rmtree(tmp)