[CMF-checkins] CVS: CMF - test_DateC.py:1.4
Jeffrey Shell
jeffrey@digicool.com
Tue, 22 May 2001 09:28:49 -0400 (EDT)
Update of /cvs-repository/CMF/CMFTopic/tests
In directory korak.digicool.com:/home/jeffrey/InstanceHomes/cmf-dev/CMF/CMFTopic/tests
Modified Files:
test_DateC.py
Log Message:
Changed try/except clauses to 'self.assertRaises()'
--- Updated File test_DateC.py in package CMF --
--- test_DateC.py 2001/04/08 19:18:22 1.3
+++ test_DateC.py 2001/05/22 13:28:49 1.4
@@ -44,9 +44,7 @@
assert friendly.daterange == 'old'
# Bogus value on the operation
- try: friendly.edit(4, 'min:max', 'new')
- except ValueError: pass
- except: raise
+ self.assertRaises(ValueError, friendly.edit, 4, 'min:max', 'new')
def test_StringAsValue(self):
friendly = FriendlyDate('foo', 'foofield')
@@ -60,9 +58,7 @@
assert friendly.value is None
# Bogus value on the, well, value
- try: friendly.edit('blah')
- except ValueError: pass
- except: raise
+ self.assertRaises(ValueError, friendly.edit, 'blah')
def test_FiveDaysOld(self):
date = (DateTime() - 4).Date()