Esempio n. 1
0
def test_load_components():
    loaded = ctx.load_components([Implementation1, Implementation2, Implementation3])
    eq_(len(loaded), 3)

    assert_true(Implementation1 in loaded)
    assert_true(Implementation2 in loaded)
    assert_true(Implementation3 in loaded)
    assert_false(Interface1 in loaded)
    assert_false(Interface2 in loaded)
    assert_false(Interface3 in loaded)

    eq_(len(ctx.get_implementations(Interface1)), 2)
    eq_(len(ctx.get_implementations(Interface2)), 2)
Esempio n. 2
0
def test_load_components():
    loaded = ctx.load_components(
        [Implementation1, Implementation2, Implementation3])
    eq_(len(loaded), 3)

    assert_true(Implementation1 in loaded)
    assert_true(Implementation2 in loaded)
    assert_true(Implementation3 in loaded)
    assert_false(Interface1 in loaded)
    assert_false(Interface2 in loaded)
    assert_false(Interface3 in loaded)

    eq_(len(ctx.get_implementations(Interface1)), 2)
    eq_(len(ctx.get_implementations(Interface2)), 2)
Esempio n. 3
0
def _setup_components():
    ctx.load_components(_test_components)
Esempio n. 4
0
def _setup_components():
    ctx.load_components(_test_components)