示例#1
0
文件: __init__.py 项目: chevah/utils
def setup_package():
    # Don't run these tests if we can not access privileged OS part.
    if not ChevahTestCase.haveSuperPowers():
        raise ChevahTestCase.skipTest()
    # Initialize the testing OS.

    try:
        setup_os(users=TEST_USERS, groups=TEST_GROUPS)
    except:
        import traceback
        print traceback.format_exc()
        print "Failed to initilized the system accounts!"
        teardown_os(users=TEST_USERS, groups=TEST_GROUPS)
        raise