summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_http_cookiejar.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-05-16 07:25:10 (GMT)
committerGitHub <noreply@github.com>2024-05-16 07:25:10 (GMT)
commit0152dc4ff5534fa2948b95262e70ff6b202b9b99 (patch)
treecf311cb487a6f1956ab942d6356e5b5698659f85 /Lib/test/test_http_cookiejar.py
parent0142a2292c3d3bfa56a987d576a9678be0f56931 (diff)
downloadcpython-0152dc4ff5534fa2948b95262e70ff6b202b9b99.zip
cpython-0152dc4ff5534fa2948b95262e70ff6b202b9b99.tar.gz
cpython-0152dc4ff5534fa2948b95262e70ff6b202b9b99.tar.bz2
gh-119064: Use os_helper.FakePath instead of pathlib.Path in tests (GH-119065)
Diffstat (limited to 'Lib/test/test_http_cookiejar.py')
-rw-r--r--Lib/test/test_http_cookiejar.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_http_cookiejar.py b/Lib/test/test_http_cookiejar.py
index 97e9c82..dbf9ce1 100644
--- a/Lib/test/test_http_cookiejar.py
+++ b/Lib/test/test_http_cookiejar.py
@@ -9,7 +9,6 @@ from test.support import warnings_helper
import time
import unittest
import urllib.request
-import pathlib
from http.cookiejar import (time2isoz, http2time, iso2time, time2netscape,
parse_ns_headers, join_header_words, split_header_words, Cookie,
@@ -337,9 +336,9 @@ class FileCookieJarTests(unittest.TestCase):
self.assertEqual(c.filename, filename)
def test_constructor_with_path_like(self):
- filename = pathlib.Path(os_helper.TESTFN)
- c = LWPCookieJar(filename)
- self.assertEqual(c.filename, os.fspath(filename))
+ filename = os_helper.TESTFN
+ c = LWPCookieJar(os_helper.FakePath(filename))
+ self.assertEqual(c.filename, filename)
def test_constructor_with_none(self):
c = LWPCookieJar(None)