We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
varnames()
1 parent 1b4aceb commit 6c23946Copy full SHA for 6c23946
testing/test_helpers.py
@@ -13,16 +13,16 @@ class B(object):
13
def __call__(self, z):
14
pass
15
16
- assert varnames(f) == ("x",)
17
- assert varnames(A().f) == ('y',)
18
- assert varnames(B()) == ('z',)
+ assert varnames(f) == (("x",), ())
+ assert varnames(A().f) == (('y',), ())
+ assert varnames(B()) == (('z',), ())
19
20
21
def test_varnames_default():
22
def f(x, y=3):
23
24
25
+ assert varnames(f) == (("x",), ("y",))
26
27
28
def test_varnames_class():
@@ -40,10 +40,10 @@ def __init__(self, x):
40
class F(object):
41
42
43
- assert varnames(C) == ("x",)
44
- assert varnames(D) == ()
45
- assert varnames(E) == ("x",)
46
- assert varnames(F) == ()
+ assert varnames(C) == (("x",), ())
+ assert varnames(D) == ((), ())
+ assert varnames(E) == (("x",), ())
+ assert varnames(F) == ((), ())
47
48
49
def test_formatdef():
0 commit comments