1
1
# pylint: disable=missing-module-docstring, missing-function-docstring, protected-access
2
2
import os
3
3
import unittest .mock
4
- from pathlib import Path , PosixPath
4
+ from pathlib import Path
5
5
from typing import Union
6
6
7
7
import pylint .lint
@@ -34,7 +34,7 @@ def check_configuration_file_reader(config_file: Union[str, Path]) -> Run:
34
34
return runner
35
35
36
36
37
- def test_can_read_ini (tmp_path : PosixPath ) -> None :
37
+ def test_can_read_ini (tmp_path : Path ) -> None :
38
38
# Check that we can read the "regular" INI .pylintrc file
39
39
config_file = tmp_path / ".pylintrc"
40
40
config_file .write_text (
@@ -48,7 +48,7 @@ def test_can_read_ini(tmp_path: PosixPath) -> None:
48
48
check_configuration_file_reader (config_file )
49
49
50
50
51
- def test_can_read_setup_cfg (tmp_path : PosixPath ) -> None :
51
+ def test_can_read_setup_cfg (tmp_path : Path ) -> None :
52
52
# Check that we can read a setup.cfg (which is an INI file where
53
53
# section names are prefixed with "pylint."
54
54
config_file = tmp_path / "setup.cfg"
@@ -63,7 +63,7 @@ def test_can_read_setup_cfg(tmp_path: PosixPath) -> None:
63
63
check_configuration_file_reader (config_file )
64
64
65
65
66
- def test_can_read_toml (tmp_path : PosixPath ) -> None :
66
+ def test_can_read_toml (tmp_path : Path ) -> None :
67
67
# Check that we can read a TOML file where lists and integers are
68
68
# expressed as strings.
69
69
config_file = tmp_path / "pyproject.toml"
@@ -78,7 +78,7 @@ def test_can_read_toml(tmp_path: PosixPath) -> None:
78
78
check_configuration_file_reader (config_file )
79
79
80
80
81
- def test_can_read_toml_rich_types (tmp_path : PosixPath ) -> None :
81
+ def test_can_read_toml_rich_types (tmp_path : Path ) -> None :
82
82
# Check that we can read a TOML file where lists, integers and
83
83
# booleans are expressed as such (and not as strings), using TOML
84
84
# type system.
@@ -97,7 +97,7 @@ def test_can_read_toml_rich_types(tmp_path: PosixPath) -> None:
97
97
check_configuration_file_reader (config_file )
98
98
99
99
100
- def test_can_read_toml_env_variable (tmp_path : PosixPath ) -> None :
100
+ def test_can_read_toml_env_variable (tmp_path : Path ) -> None :
101
101
"""We can read and open a properly formatted toml file."""
102
102
config_file = tmp_path / "pyproject.toml"
103
103
config_file .write_text (
0 commit comments