I have been reading about nose and I find it great.
I have been looking into TG's test and all exceptions related are like this, so say the exception name in the string but what if I must be sure that I get exception type X
try:
w.name = "foo"
assert False, "should have gotten an exception"
except ValueError:
pass
I have this, but it will actually fail all the time, and since we don't have python 2.6 we can't use the try/catch/finally, so any suggestions on how to test for method foo to raise exception bar and fail the test if that doesn't happen?
def test_create(self):
try:
source.create ()
except NotImplementedError:
assert True
assert False
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

