comparison test/test_dates.py @ 635:3d61b5d2243e

Added popup help for classes using the classhelp html template function. - add <display call="classhelp('priority', 'id,name,description')"> to an item page, and it generates a link to a popup window which displays the id, name and description for the priority class. The description field won't exist in most installations, but it will be added to the default templates.
author Richard Jones <richard@users.sourceforge.net>
date Thu, 21 Feb 2002 06:57:39 +0000
parents 22e0edf7da6e
children 7dd13fd5d8ea
comparison
equal deleted inserted replaced
634:53549c6a7b33 635:3d61b5d2243e
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: test_dates.py,v 1.8 2002-01-16 07:02:57 richard Exp $ 18 # $Id: test_dates.py,v 1.9 2002-02-21 06:57:39 richard Exp $
19 19
20 import unittest, time 20 import unittest, time
21 21
22 from roundup.date import Date, Interval 22 from roundup.date import Date, Interval
23 23
68 ae(str(date), '%s-11-07.14:32:43'%y) 68 ae(str(date), '%s-11-07.14:32:43'%y)
69 date = Date("14:25", -5) 69 date = Date("14:25", -5)
70 ae(str(date), '%s-%02d-%02d.19:25:00'%(y, m, d)) 70 ae(str(date), '%s-%02d-%02d.19:25:00'%(y, m, d))
71 date = Date("8:47:11", -5) 71 date = Date("8:47:11", -5)
72 ae(str(date), '%s-%02d-%02d.13:47:11'%(y, m, d)) 72 ae(str(date), '%s-%02d-%02d.13:47:11'%(y, m, d))
73 # TODO: assert something
74 Date() + Interval('- 2y 2m')
73 75
74 def testInterval(self): 76 def testInterval(self):
75 ae = self.assertEqual 77 ae = self.assertEqual
76 ae(str(Interval('3y')), '+ 3y') 78 ae(str(Interval('3y')), '+ 3y')
77 ae(str(Interval('2 y 1 m')), '+ 2y 1m') 79 ae(str(Interval('2 y 1 m')), '+ 2y 1m')
85 return unittest.makeSuite(DateTestCase, 'test') 87 return unittest.makeSuite(DateTestCase, 'test')
86 88
87 89
88 # 90 #
89 # $Log: not supported by cvs2svn $ 91 # $Log: not supported by cvs2svn $
92 # Revision 1.8 2002/01/16 07:02:57 richard
93 # . lots of date/interval related changes:
94 # - more relaxed date format for input
95 #
90 # Revision 1.7 2001/08/13 23:01:53 richard 96 # Revision 1.7 2001/08/13 23:01:53 richard
91 # fixed a 2.1-ism 97 # fixed a 2.1-ism
92 # 98 #
93 # Revision 1.6 2001/08/07 00:24:43 richard 99 # Revision 1.6 2001/08/07 00:24:43 richard
94 # stupid typo 100 # stupid typo

Roundup Issue Tracker: http://roundup-tracker.org/