diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2024-05-16 07:25:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-16 07:25:10 (GMT) |
commit | 0152dc4ff5534fa2948b95262e70ff6b202b9b99 (patch) | |
tree | cf311cb487a6f1956ab942d6356e5b5698659f85 /Lib/test/test_configparser.py | |
parent | 0142a2292c3d3bfa56a987d576a9678be0f56931 (diff) | |
download | cpython-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_configparser.py')
-rw-r--r-- | Lib/test/test_configparser.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_configparser.py b/Lib/test/test_configparser.py index fe09472..a934e49 100644 --- a/Lib/test/test_configparser.py +++ b/Lib/test/test_configparser.py @@ -2,7 +2,6 @@ import collections import configparser import io import os -import pathlib import textwrap import unittest @@ -745,12 +744,12 @@ boolean {0[0]} NO self.assertEqual(cf.get("Foo Bar", "foo"), "newbar") # check when we pass only a Path object: cf = self.newconfig() - parsed_files = cf.read(pathlib.Path(file1), encoding="utf-8") + parsed_files = cf.read(os_helper.FakePath(file1), encoding="utf-8") self.assertEqual(parsed_files, [file1]) self.assertEqual(cf.get("Foo Bar", "foo"), "newbar") # check when we passed both a filename and a Path object: cf = self.newconfig() - parsed_files = cf.read([pathlib.Path(file1), file1], encoding="utf-8") + parsed_files = cf.read([os_helper.FakePath(file1), file1], encoding="utf-8") self.assertEqual(parsed_files, [file1, file1]) self.assertEqual(cf.get("Foo Bar", "foo"), "newbar") # check when we pass only missing files: |