Python: Fixup test_only_starargs addition

validTest.py did not pass, since we use `SINK3_F`.

I initially tried swapping the order

```
args = (arg1, arg2) # $ arg1 arg2 func=starargs_only
more_args = (arg4, arg3)
starargs_only(*args, *more_args)
```

But then asked myself, what is it _actually_ we're testing here? and it
seems to be the way we handle multiple *args arguments in the same call,
so I converted the test to be that instead! (and it matches what we do
in test_stararg_mixed)
This commit is contained in:
Rasmus Wriedt Larsen
2023-01-25 09:32:37 +01:00
parent 0879c8f8e1
commit 63b2bd0871

View File

@@ -207,7 +207,7 @@ def starargs_only(*args):
SINK2(args[1])
SINK3_F(args[2])
@expects(3*3)
@expects(5*3)
def test_only_starargs():
starargs_only(arg1, arg2, "safe") # $ arg1 arg2 SPURIOUS: bad2,bad3="arg1" bad1,bad3="arg2"
@@ -217,9 +217,12 @@ def test_only_starargs():
args = (arg1, arg2, "safe") # $ arg1 arg2 func=starargs_only
starargs_only(*args)
args = (arg1, arg2) # $ arg1 arg2 func=starargs_only
more_args = (arg3, arg4)
starargs_only(*args, *more_args)
empty_args = ()
args = (arg1, arg2, "safe") # $ arg1 arg2 func=starargs_only
starargs_only(*args, *empty_args)
args = (arg1, arg2, "safe") # $ MISSING: arg1 arg2 func=starargs_only
starargs_only(*empty_args, *args)
def starargs_mixed(a, *args):