Exemple #1
0
def test_bindcallargs2():
    out = bindcallargs(F2, d=0, e=1, f=2)
    out_ = ((), {'d':0, 'e':1, 'f':2})
    assert_equal(out, out_)
    out = bindcallargs(F2, d=0, e=1)
    out_ = ((), {'d':0, 'e':1, 'f':5})
    assert_equal(out, out_)
    assert_raises(TypeError, bindcallargs, F2, d=0, f=2)
Exemple #2
0
def test_bindcallargs2():
    out = bindcallargs(F2, d=0, e=1, f=2)
    out_ = ((), {'d': 0, 'e': 1, 'f': 2})
    assert_equal(out, out_)
    out = bindcallargs(F2, d=0, e=1)
    out_ = ((), {'d': 0, 'e': 1, 'f': 5})
    assert_equal(out, out_)
    assert_raises(TypeError, bindcallargs, F2, d=0, f=2)
Exemple #3
0
def test_bindcallargs2():
    out = bindcallargs(F2, d=0, e=1, f=2)
    out_ = ((), {'d':0, 'e':1, 'f':2})
    assert out == out_
    out = bindcallargs(F2, d=0, e=1)
    out_ = ((), {'d':0, 'e':1, 'f':5})
    assert out == out_
    with pytest.raises(TypeError):
        bindcallargs(F2, d=0, f=2)
Exemple #4
0
def test_bindcallargs2():
    out = bindcallargs(F2, d=0, e=1, f=2)
    out_ = ((), {'d': 0, 'e': 1, 'f': 2})
    assert out == out_
    out = bindcallargs(F2, d=0, e=1)
    out_ = ((), {'d': 0, 'e': 1, 'f': 5})
    assert out == out_
    with pytest.raises(TypeError):
        bindcallargs(F2, d=0, f=2)
Exemple #5
0
def test_bindcallargs3():
    out = bindcallargs(F3, 0, 1, 2, 3, 4, 5, c=6, e=-8)
    out_ = ((0, 1, 2, 3, 4, 5), {'c':6, 'd':7, 'e':-8})
    assert_equal(out, out_)
Exemple #6
0
def test_bindcallargs1():
    out = bindcallargs(F1, 0, 1, d=3, e=4, extra='hello')
    out_ = ((0, 1, 2), {'d':3, 'e':4, 'f':5, 'extra': 'hello'})
    assert_equal(out, out_)
Exemple #7
0
def test_bindcallargs2():
    out = bindcallargs(F2, 0)
    out_ = ((0, 3), {})
    assert_equal(out, out_)
Exemple #8
0
def test_bindcallargs1():
    out = bindcallargs(F1, 0, 1, 3, 4, 5, extra='hello')
    out_ = ((0, 1, 3, 4, 5), {'extra': 'hello'})
    assert_equal(out, out_)
Exemple #9
0
def test_bindcallargs0():
    out = bindcallargs(F0, 5, 4, 3, 2, 1, hello='there')
    out_ = (5, 4, 3, 2, 1), {'hello': 'there'}
    assert_equal(out, out_)
Exemple #10
0
def test_bindcallargs1():
    out = bindcallargs(F1, 0, 1, d=3, e=4, extra='hello')
    out_ = ((0, 1, 2), {'d': 3, 'e': 4, 'f': 5, 'extra': 'hello'})
    assert out == out_
Exemple #11
0
def test_bindcallargs2():
    out = bindcallargs(F2, 0)
    out_ = ((0, 3), {})
    assert_equal(out, out_)