Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9062822

Browse filesBrowse files
authored
MNT Use tmp_path fixture for test_check_memory (#31453)
1 parent bb56546 commit 9062822
Copy full SHA for 9062822

File tree

Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed

‎sklearn/utils/tests/test_validation.py

Copy file name to clipboardExpand all lines: sklearn/utils/tests/test_validation.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,9 +1161,10 @@ class WrongDummyMemory:
11611161
pass
11621162

11631163

1164-
def test_check_memory():
1165-
memory = check_memory("cache_directory")
1166-
assert memory.location == "cache_directory"
1164+
def test_check_memory(tmp_path):
1165+
cache_directory = str(tmp_path / "cache_directory")
1166+
memory = check_memory(cache_directory)
1167+
assert memory.location == cache_directory
11671168

11681169
memory = check_memory(None)
11691170
assert memory.location is None

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.