예제 #1
0
def pytest_runtest_setup(item):
    """A pytest hook that is called before each test item is executed."""
    # We need to re-initialize flags (and hence also testing setup) because
    # various modules might have various flags defined.
    global last_module
    if last_module != item.module:
        flags.Initialize()
        testing_startup.TestInit()
    last_module = item.module
예제 #2
0
def main(argv=None):
    del argv  # Unused.
    flags.Initialize()
    testing_startup.TestInit()
    absltest.main()