def AssertVTLevel(minimum, reason): """Checks that the vtLevel is at least minimum. This is used to find bugs in tests that are not properly annotated with a vt level. """ if esc.vtLevel < minimum: if reason is not None: LogInfo("BUG: " + reason + " feature is not supported at this level") raise esctypes.InsufficientVTLevel(esc.vtLevel, minimum)
def func_wrapper(self, *args, **kwargs): if esc.vtLevel >= minimum: func(self, *args, **kwargs) else: raise esctypes.InsufficientVTLevel(esc.vtLevel, minimum)