test(python-generator): update tests for PEP 8 compliance

Updated test cases to the new default value PEP 8 compliance and added
new test cases to test the new behavior.
This commit is contained in:
jakob.scheid committed 2026-09-22 16:13:23 +02:00
1 parent cc786a6c69
commit 17c5e4938f
8 files changed
+331 -24

No files matched your search

@@ -685,7 +685,7 @@ def argument_list(argument_list: str) -> ast.arguments:
),
(
argument_list(
"a = 1, b = 'a', /, *args, c = None, d = True, **kwargs",
"a=1, b='a', /, *args, c=None, d=True, **kwargs",
),
[
PythonFunctionArgument(
@@ -727,9 +727,7 @@ def argument_list(argument_list: str) -> ast.arguments:
],
),
(
argument_list(
"a, b = 'a', /, *args, c = None, d = True, **kwargs"
),
argument_list("a, b='a', /, *args, c=None, d=True, **kwargs"),
[
PythonFunctionArgument(
'a',
@@ -767,7 +765,7 @@ def argument_list(argument_list: str) -> ast.arguments:
],
),
(
argument_list('a, b , /, *args, c = None, d = True, **kwargs'),
argument_list('a, b , /, *args, c=None, d=True, **kwargs'),
[
PythonFunctionArgument(
'a',
@@ -808,7 +806,7 @@ def argument_list(argument_list: str) -> ast.arguments:
],
),
(
argument_list('a, b , /, *args, c, d = True, **kwargs'),
argument_list('a, b , /, *args, c, d=True, **kwargs'),
[
PythonFunctionArgument(
'a',
@@ -890,7 +888,7 @@ def argument_list(argument_list: str) -> ast.arguments:
],
),
(
argument_list('a, b , /, *args, c = None, d, **kwargs'),
argument_list('a, b , /, *args, c=None, d, **kwargs'),
[
PythonFunctionArgument(
'a',
@@ -931,7 +929,7 @@ def argument_list(argument_list: str) -> ast.arguments:
],
),
(
argument_list('a = 1'),
argument_list('a=1'),
[
PythonFunctionArgument(
'a',
@@ -362,7 +362,7 @@ from src.jcloud_docsgen.exceptions import (
'1',
None,
PythonArgumentStructureError,
'* or ** arguments cannot have default values: *a = 1',
'* or ** arguments cannot have default values: *a=1',
),
(
'a',
@@ -370,7 +370,7 @@ from src.jcloud_docsgen.exceptions import (
'1',
None,
PythonArgumentStructureError,
'* or ** arguments cannot have default values: **a = 1',
'* or ** arguments cannot have default values: **a=1',
),
],
)
@@ -498,7 +498,7 @@ def test_PythonFunctionArgument_asterik(name, kind, annotation):
'1',
None,
),
'a = 1',
'a=1',
),
(
PythonFunctionArgument(
@@ -531,7 +531,7 @@ def test_PythonFunctionArgument_asterik(name, kind, annotation):
'1',
None,
),
'a = 1',
'a=1',
),
(
PythonFunctionArgument(
@@ -567,7 +567,7 @@ def test_PythonFunctionArgument_asterik(name, kind, annotation):
'1',
None,
),
'a = 1',
'a=1',
),
(
PythonFunctionArgument(