def __getString( self , ticks , sep ): """__getString(t,s) --> string Return date corresponding to ticks (t) as a string of format: YYYY[sep]MM[sep]DD HH:MM:SS where [sep] == the separator (s). """ if '-' == sep: return datelib.asctime( ticks ) elif '/' == sep: return datelib.cvstime( ticks ) else: raise TimestampException( 'Invalid separator value: %s' % sep )
def testFormat4(self): assertEquals('String', datelib.asctime(ticks4), asctime4)
def testFormat3(self): assertEquals('String', datelib.asctime(ticks3), asctime3)
def testFormat1(self): assertEquals('String', datelib.asctime(ticks1), asctime1)