@@ -16,15 +16,32 @@ def f(a, b=0, c=0, d=0):
16
16
return a + b + c + d
17
17
18
18
19
- def test_two_arguments (x ):
19
+ def test_one_arguments ():
20
+ """
21
+ Check whether no future warning is produced if one
22
+ positional argument given.
23
+ """
24
+ assert f (19 ) == 19
25
+
26
+
27
+ def test_one_and_one_arguments ():
28
+ """
29
+ Check whether no future warning is produced if one
30
+ positional argument and one keyword argument are
31
+ given.
32
+ """
33
+ assert f (19 , d = 6 ) == 25
34
+
35
+
36
+ def test_two_arguments ():
20
37
"""
21
38
Check whether no future warning is produced if two
22
39
positional arguments given.
23
40
"""
24
41
assert f (1 , 5 ) == 6
25
42
26
43
27
- def test_two_and_two_arguments (x ):
44
+ def test_two_and_two_arguments ():
28
45
"""
29
46
Check whether no future warning is produced if two
30
47
positional arguments and two keyword arguments are
@@ -33,7 +50,16 @@ def test_two_and_two_arguments(x):
33
50
assert f (1 , 3 , c = 3 , d = 5 ) == 12
34
51
35
52
36
- def test_four_arguments (x ):
53
+ def test_three_arguments ():
54
+ """
55
+ Check whether a future warning is produced if four
56
+ positional arguments given.
57
+ """
58
+ with tm .assert_produces_warning (FutureWarning ):
59
+ assert f (6 , 3 , 3 ) == 12
60
+
61
+
62
+ def test_four_arguments ():
37
63
"""
38
64
Check whether a future warning is produced if four
39
65
positional arguments given.
0 commit comments