Пример #1
0
def _create_des_(msg):
    if msg is None :
        return {}
    elif not(isinstance(msg, types.StringTypes)):
        raise pexception.PytestembError("Msg must be a string")
    else:
        return dict({"msg":"%s" % msg})
Пример #2
0
 def set_cleanup(self, funcCleanup):
     if self.cleanup == self._nothing_:
         self.cleanup = funcCleanup
     else:
         # Avoid user mistake with two time function set
         raise pexception.PytestembError("CleanUp function already set")