Skip to content

Commit

Permalink
Merge pull request #241 from horw/feat/cache_file_remove_conftest
Browse files Browse the repository at this point in the history
feat: remove cache file when tests pytest-embedded itself
  • Loading branch information
hfudev authored Dec 1, 2023
2 parents a101546 + a8b5d5a commit f41b012
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ def copy_fixtures(testdir):
yield


@pytest.fixture(autouse=True)
def cache_file_remove(cache_dir):
yield
_cache_file_path = os.path.join(cache_dir, 'port_target_cache')
if os.path.exists(_cache_file_path):
os.remove(_cache_file_path)


@pytest.fixture
def first_index_of_messages():
def _fake(_pattern: Pattern, _messages: List[str], _start: int = 0) -> int:
Expand Down

0 comments on commit f41b012

Please sign in to comment.