コード例 #1
0
def test_module_load():
    assert deal.activate()
    try:
        deal.module_load(deal.silent)
    finally:
        assert deactivate()

    with pytest.raises(RuntimeError):
        deal.module_load(deal.silent)
コード例 #2
0
def test_state_switch_module_load_debug():
    with pytest.raises(RuntimeError):
        deal.module_load()
    try:
        deal.disable()
        deal.activate()
        deal.enable()
    finally:
        deactivate()
        deal.reset()
コード例 #3
0
def test_state_switch_module_load_debug():
    with pytest.raises(RuntimeError):
        deal.module_load(debug=True)
    try:
        deal.switch(debug=False)
        deal.activate()
        deal.module_load(debug=True)
    finally:
        deactivate()
        deal.switch(debug=True)
コード例 #4
0
def test_module_load_no_contracts():
    with pytest.raises(RuntimeError):
        deal.module_load()