Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

src/p/y/pyroute2-HEAD/tests/test_ipdb.py   pyroute2(Download)
from pyroute2.netlink.ipdb import clear_fail_bit
from pyroute2.netlink.ipdb import set_fail_bit
from pyroute2.netlink.ipdb import _FAIL_COMMIT
from pyroute2.netlink.ipdb import _FAIL_ROLLBACK
from utils import grep
 
        # commits should fail
        clear_fail_bit(_FAIL_COMMIT)
        clear_fail_bit(_FAIL_ROLLBACK)
        try:
        finally:
            # set bit again
            set_fail_bit(_FAIL_COMMIT)
            set_fail_bit(_FAIL_ROLLBACK)
 
 
        # commits should fail
        clear_fail_bit(_FAIL_COMMIT)
        try:
            # create bridge
        finally:
            # set bit again
            set_fail_bit(_FAIL_COMMIT)
 
        # expected results: