Skip to content

Commit

Permalink
Port tests to match new varnames() return value
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Goodlet committed Feb 13, 2017
1 parent 1b4aceb commit 6c23946
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions testing/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ class B(object):
def __call__(self, z):
pass

assert varnames(f) == ("x",)
assert varnames(A().f) == ('y',)
assert varnames(B()) == ('z',)
assert varnames(f) == (("x",), ())
assert varnames(A().f) == (('y',), ())
assert varnames(B()) == (('z',), ())


def test_varnames_default():
def f(x, y=3):
pass

assert varnames(f) == ("x",)
assert varnames(f) == (("x",), ("y",))


def test_varnames_class():
Expand All @@ -40,10 +40,10 @@ def __init__(self, x):
class F(object):
pass

assert varnames(C) == ("x",)
assert varnames(D) == ()
assert varnames(E) == ("x",)
assert varnames(F) == ()
assert varnames(C) == (("x",), ())
assert varnames(D) == ((), ())
assert varnames(E) == (("x",), ())
assert varnames(F) == ((), ())


def test_formatdef():
Expand Down

0 comments on commit 6c23946

Please sign in to comment.