diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functional/a/arguments_positional_only.py | 15 | ||||
-rw-r--r-- | tests/functional/a/arguments_positional_only.rc | 2 | ||||
-rw-r--r-- | tests/functional/a/arguments_positional_only.txt | 1 |
3 files changed, 18 insertions, 0 deletions
diff --git a/tests/functional/a/arguments_positional_only.py b/tests/functional/a/arguments_positional_only.py new file mode 100644 index 000000000..eb03f1803 --- /dev/null +++ b/tests/functional/a/arguments_positional_only.py @@ -0,0 +1,15 @@ +"""Test `no-value-for-parameter` in the context of positional-only parameters""" + +# pylint: disable=missing-docstring, unused-argument + + +def name1(param1, /, **kwargs): ... +def name2(param1, /, param2, **kwargs): ... +def name3(param1=True, /, **kwargs): ... +def name4(param1, **kwargs): ... + +name1(param1=43) # [no-value-for-parameter] +name1(43) +name2(1, param2=False) +name3() +name4(param1=43) diff --git a/tests/functional/a/arguments_positional_only.rc b/tests/functional/a/arguments_positional_only.rc new file mode 100644 index 000000000..85fc502b3 --- /dev/null +++ b/tests/functional/a/arguments_positional_only.rc @@ -0,0 +1,2 @@ +[testoptions] +min_pyver=3.8 diff --git a/tests/functional/a/arguments_positional_only.txt b/tests/functional/a/arguments_positional_only.txt new file mode 100644 index 000000000..7112e6880 --- /dev/null +++ b/tests/functional/a/arguments_positional_only.txt @@ -0,0 +1 @@ +no-value-for-parameter:11:0:11:16::No value for argument 'param1' in function call:UNDEFINED |