Skip to content

Commit d43b414

Browse files
committed
Make tests work with black 24.2.0
Closes: python-lsp#55
1 parent 307e87d commit d43b414

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

setup.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ install_requires =
2222
python-lsp-server>=1.4.0
2323
black>=23.11.0
2424
tomli; python_version<'3.11'
25+
tests_require =
26+
black>=24.2.0
2527
python_requires = >= 3.8
2628

2729
[options.entry_points]

tests/test_plugin.py

+16-2
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,14 @@ def test_load_config_defaults(config):
281281

282282
assert config == {
283283
"line_length": 88,
284-
"target_version": set(),
284+
"target_version": set(
285+
[
286+
black.TargetVersion.PY38,
287+
black.TargetVersion.PY39,
288+
black.TargetVersion.PY310,
289+
black.TargetVersion.PY311,
290+
]
291+
),
285292
"pyi": False,
286293
"fast": False,
287294
"skip_magic_trailing_comma": False,
@@ -297,7 +304,14 @@ def test_load_config_with_skip_options(config_with_skip_options):
297304

298305
assert config == {
299306
"line_length": 88,
300-
"target_version": set(),
307+
"target_version": set(
308+
[
309+
black.TargetVersion.PY38,
310+
black.TargetVersion.PY39,
311+
black.TargetVersion.PY310,
312+
black.TargetVersion.PY311,
313+
]
314+
),
301315
"pyi": False,
302316
"fast": False,
303317
"skip_magic_trailing_comma": True,

0 commit comments

Comments
 (0)