diff options
author | Damien George <damien.p.george@gmail.com> | 2014-07-05 06:14:29 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-07-05 06:14:29 +0100 |
commit | 539681fffd96082ca3b5d18643d4f08f65c47170 (patch) | |
tree | 7e6f8332c6e7737b768750e67265bb02b22932e6 /tests/basics/fun_varargs.py | |
parent | 0182385ab0b4a1b2e549c92f8f5b621135aeb975 (diff) |
tests: Rename test scripts, changing - to _ for consistency.
From now on, all new tests must use underscore.
Addresses issue #727.
Diffstat (limited to 'tests/basics/fun_varargs.py')
-rw-r--r-- | tests/basics/fun_varargs.py | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/basics/fun_varargs.py b/tests/basics/fun_varargs.py new file mode 100644 index 000000000..ff29c33f7 --- /dev/null +++ b/tests/basics/fun_varargs.py @@ -0,0 +1,41 @@ +# function with just varargs +def f1(*args): + print(args) + +f1() +f1(1) +f1(1, 2) + +# function with 1 arg, then varargs +def f2(a, *args): + print(a, args) + +f2(1) +f2(1, 2) +f2(1, 2, 3) + +# function with 2 args, then varargs +def f3(a, b, *args): + print(a, b, args) + +f3(1, 2) +f3(1, 2, 3) +f3(1, 2, 3, 4) + +# function with 1 default arg, then varargs +def f4(a=0, *args): + print(a, args) + +f4() +f4(1) +f4(1, 2) +f4(1, 2, 3) + +# function with 1 arg, 1 default arg, then varargs +def f5(a, b=0, *args): + print(a, b, args) + +f5(1) +f5(1, 2) +f5(1, 2, 3) +f5(1, 2, 3, 4) |