Skip to content

Commit 6e5f957

Browse files
committed
fix(tests): prevent cache interference in test_daisy_ui_support
- Added cache clearing at the start of test_daisy_ui_support - Resolves test failure in Django 4.1 with Python 3.10 environment - Ensures test isolation by preventing cached values from other tests
1 parent cf28e84 commit 6e5f957

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,14 @@ def test_daisy_ui_support(
362362
settings: SettingsWrapper,
363363
mocker: MockerFixture,
364364
):
365+
from django_tailwind_cli.config import _get_cache_path
365366
from semver import Version
366367

368+
# Clear any existing cache to prevent interference from other tests
369+
cache_path = _get_cache_path()
370+
if cache_path.exists():
371+
cache_path.unlink()
372+
367373
settings.TAILWIND_CLI_USE_DAISY_UI = True
368374
test_version = "7.6.5"
369375
request_get = mocker.patch("django_tailwind_cli.utils.http.fetch_redirect_location")

0 commit comments

Comments
 (0)