Skip to content

Commit

Permalink
prevent test suite not cleaning tmp dirs (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert authored Nov 9, 2024
1 parent 8cfe98e commit f01cfef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_cache_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
Unit tests that verify our caching methods work correctly.
"""

import os
import time
from tempfile import mkdtemp
from unittest.mock import ANY, Mock

import pytest
Expand Down Expand Up @@ -143,7 +143,7 @@ def test_update_cached_response_no_local_cache(self):
result = cc.update_cached_response(req, resp)
assert result is resp

def test_update_cached_response_with_valid_headers_separate_body(self):
def test_update_cached_response_with_valid_headers_separate_body(self, tmp_path):
"""
If the local cache has the given URL ``update_cached_response()`` will:
Expand All @@ -152,7 +152,7 @@ def test_update_cached_response_with_valid_headers_separate_body(self):
This is the version for a cache that stores a separate body.
"""
cache = SeparateBodyFileCache(mkdtemp())
cache = SeparateBodyFileCache(os.fsdecode(tmp_path))
self.update_cached_response_with_valid_headers_test(cache)

def test_update_cached_response_with_valid_headers(self):
Expand Down

0 comments on commit f01cfef

Please sign in to comment.