Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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_)
Пример #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_)
Пример #7
0
def test_bindcallargs2():
    out = bindcallargs(F2, 0)
    out_ = ((0, 3), {})
    assert_equal(out, out_)
Пример #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_)
Пример #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_)
Пример #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_
Пример #11
0
def test_bindcallargs2():
    out = bindcallargs(F2, 0)
    out_ = ((0, 3), {})
    assert_equal(out, out_)