Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
KDevelop
KDevelop Python Support
Commits
204c7f38
Commit
204c7f38
authored
Oct 26, 2022
by
frmdstryr
Committed by
Sven Brauch
Nov 05, 2022
Browse files
Add a few more duchain tests for kw only args
parent
185978bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
duchain/tests/pyduchaintest.cpp
View file @
204c7f38
...
...
@@ -888,6 +888,9 @@ void PyDUChainTest::testTypes_data()
QTest
::
newRow
(
"arg_kw_default_after_no_default"
)
<<
"def func(x=5, *, a, z='foo'): return z
\n
checkme = func()"
<<
"str"
;
QTest
::
newRow
(
"arg_kw_default"
)
<<
"def func(x=5, *, z='foo'): return z
\n
checkme = func()"
<<
"str"
;
QTest
::
newRow
(
"arg_kw_default_after_default"
)
<<
"def func(x=5, *, y='foo', z=True): return z
\n
checkme = func()"
<<
"bool"
;
QTest
::
newRow
(
"kw_default_before_default"
)
<<
"def func(*, y='foo', z=True): return y
\n
checkme = func()"
<<
"str"
;
QTest
::
newRow
(
"kw_default_after_no_default"
)
<<
"def func(*, y, z=True): return y
\n
checkme = func()"
<<
"mixed"
;
QTest
::
newRow
(
"kw_default_after_default"
)
<<
"def func(*, y='foo', z=True): return z
\n
checkme = func()"
<<
"bool"
;
QTest
::
newRow
(
"class_scope_end_inside"
)
<<
"a = str()
\n
class M:
\n
"
" a = 2
\n
foo = a
\n
"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment