From 539681fffd96082ca3b5d18643d4f08f65c47170 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 5 Jul 2014 06:14:29 +0100 Subject: tests: Rename test scripts, changing - to _ for consistency. From now on, all new tests must use underscore. Addresses issue #727. --- tests/basics/fun-kwonly.py | 59 ---------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 tests/basics/fun-kwonly.py (limited to 'tests/basics/fun-kwonly.py') diff --git a/tests/basics/fun-kwonly.py b/tests/basics/fun-kwonly.py deleted file mode 100644 index bdff3a821..000000000 --- a/tests/basics/fun-kwonly.py +++ /dev/null @@ -1,59 +0,0 @@ -# to test keyword-only arguments - -# simplest case -def f(*, a): - print(a) - -f(a=1) - -# with 2 keyword-only args -def f(*, a, b): - print(a, b) - -f(a=1, b=2) -f(b=1, a=2) - -# positional followed by bare star -def f(a, *, b, c): - print(a, b, c) - -f(1, b=3, c=4) -f(1, c=3, b=4) -f(1, **{'b':'3', 'c':4}) - -try: - f(1) -except TypeError: - print("TypeError") - -try: - f(1, b=2) -except TypeError: - print("TypeError") - -try: - f(1, c=2) -except TypeError: - print("TypeError") - -# with **kw -def f(a, *, b, **kw): - print(a, b, kw) - -f(1, b=2) -f(1, b=2, c=3) - -# with named star -def f(*a, b, c): - print(a, b, c) - -f(b=1, c=2) -f(c=1, b=2) - -# with positional and named star -def f(a, *b, c): - print(a, b, c) - -f(1, c=2) -f(1, 2, c=3) -f(a=1, c=3) -- cgit v1.2.3