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)
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()
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)
def test_module_load_no_contracts(): with pytest.raises(RuntimeError): deal.module_load()