コード例 #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
ファイル: valid.py プロジェクト: BackupTheBerlios/pytestemb
 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")