Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent test suite not cleaning tmp dirs #342

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading