mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-30 16:10:36 +00:00
docstring-parser 0.18 no longer ships its tests in built wheels, so deal's test suite fails during collection when it tries to read docstring_parser/tests. Skip generating the cross-check cases when the directory is absent. Assisted-by: OpenCode 2 (DeepSeek V4.1 Flash Free)
17 lines
614 B
Diff
17 lines
614 B
Diff
docstring_parser 0.18 excludes its tests from built wheels, so
|
|
`docstring_parser.__path__[0] / 'tests'` does not exist and test
|
|
collection fails with FileNotFoundError. Skip generating the cross-check
|
|
test cases when the directory is unavailable.
|
|
|
|
--- a/tests/test_linter/test_extractors/test_exceptions.py
|
|
+++ b/tests/test_linter/test_extractors/test_exceptions.py
|
|
@@ -293,6 +293,8 @@ def get_docstring_parser_tests():
|
|
tests_found = 0
|
|
if astroid is None:
|
|
return
|
|
+ if not root.is_dir():
|
|
+ return
|
|
for path in root.iterdir():
|
|
if path.suffix != '.py':
|
|
continue
|