Hi,
I try to use the "failUnlessRais es()" method from unittest.TestCa se as
follows:
[color=blue][color=green]
>>self.failUnle ssRaises(Integr ityError, myObject.new(** stuff))[/color][/color]
where IntegrityError is an Exception somewhere deep inside pysqlite.
Running it spits out:
[color=blue][color=green]
>>NameError: global name 'IntegrityError ' is not defined.[/color][/color]
Do I really need to tell unittest about each and every possible
Exception it might catch. Whats going on here?
python 2.2.3 on linux 2.6.7
thanks
Paul
I try to use the "failUnlessRais es()" method from unittest.TestCa se as
follows:
[color=blue][color=green]
>>self.failUnle ssRaises(Integr ityError, myObject.new(** stuff))[/color][/color]
where IntegrityError is an Exception somewhere deep inside pysqlite.
Running it spits out:
[color=blue][color=green]
>>NameError: global name 'IntegrityError ' is not defined.[/color][/color]
Do I really need to tell unittest about each and every possible
Exception it might catch. Whats going on here?
python 2.2.3 on linux 2.6.7
thanks
Paul
Comment