comparison test/test_dates.py @ 134:d3ffcf862fb7

Fixed bug in unit test ;)
author Richard Jones <richard@users.sourceforge.net>
date Sun, 29 Jul 2001 23:32:13 +0000
parents 0791d13baea7
children d45384bc6420
comparison
equal deleted inserted replaced
133:4377732e04bb 134:d3ffcf862fb7
1 # $Id: test_dates.py,v 1.3 2001-07-29 07:01:39 richard Exp $ 1 # $Id: test_dates.py,v 1.4 2001-07-29 23:32:13 richard Exp $
2 2
3 import unittest, time 3 import unittest, time
4 4
5 from roundup.date import Date, Interval 5 from roundup.date import Date, Interval
6 6
53 def testInterval(self): 53 def testInterval(self):
54 ae = self.assertEqual 54 ae = self.assertEqual
55 ae(str(Interval('3y')), '+ 3y') 55 ae(str(Interval('3y')), '+ 3y')
56 ae(str(Interval('2 y 1 m')), '+ 2y 1m') 56 ae(str(Interval('2 y 1 m')), '+ 2y 1m')
57 ae(str(Interval('1m 25d')), '+ 1m 25d') 57 ae(str(Interval('1m 25d')), '+ 1m 25d')
58 ae(str(Interval('-2w 3 d ')), '- 1 7d') 58 ae(str(Interval('-2w 3 d ')), '- 17d')
59 ae(str(Interval(' - 1 d 2:50 ')), '- 1d 2:50') 59 ae(str(Interval(' - 1 d 2:50 ')), '- 1d 2:50')
60 ae(str(Interval(' 14:00 ')), '+ 14:00') 60 ae(str(Interval(' 14:00 ')), '+ 14:00')
61 ae(str(Interval(' 0:04:33 ')), '+ 0:04:33') 61 ae(str(Interval(' 0:04:33 ')), '+ 0:04:33')
62 62
63 def suite(): 63 def suite():
64 return unittest.makeSuite(DateTestCase, 'test') 64 return unittest.makeSuite(DateTestCase, 'test')
65 65
66 66
67 # 67 #
68 # $Log: not supported by cvs2svn $ 68 # $Log: not supported by cvs2svn $
69 # Revision 1.3 2001/07/29 07:01:39 richard
70 # Added vim command to all source so that we don't get no steenkin' tabs :)
71 #
69 # Revision 1.2 2001/07/29 06:42:20 richard 72 # Revision 1.2 2001/07/29 06:42:20 richard
70 # Added Interval tests. 73 # Added Interval tests.
71 # 74 #
72 # Revision 1.1 2001/07/27 06:55:07 richard 75 # Revision 1.1 2001/07/27 06:55:07 richard
73 # moving tests -> test 76 # moving tests -> test

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