-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc0113e
commit 7e01999
Showing
5 changed files
with
44 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
# @pytest.fixture(autouse=True, scope="session") | ||
# def no_cache() -> Iterator[None]: | ||
# TEST_CACHE: dict = {} | ||
# with patch.object(api, "svg_cache", lambda: TEST_CACHE): | ||
# yield | ||
# assert TEST_CACHE | ||
from typing import Iterator | ||
from unittest.mock import patch | ||
|
||
import pytest | ||
from pyconify import _cache, api | ||
|
||
|
||
@pytest.fixture(autouse=True, scope="session") | ||
def no_cache(tmp_path_factory: pytest.TempPathFactory) -> Iterator[None]: | ||
tmp = tmp_path_factory.mktemp("pyconify") | ||
TEST_CACHE = _cache._SVGCache(directory=tmp) | ||
with patch.object(api, "svg_cache", lambda: TEST_CACHE): | ||
yield |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters