示例#1
0
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)
示例#2
0
 def func_wrapper(self, *args, **kwargs):
     if esc.vtLevel >= minimum:
         func(self, *args, **kwargs)
     else:
         raise esctypes.InsufficientVTLevel(esc.vtLevel, minimum)