On 8/7/06, Alberto Valverde <[EMAIL PROTECTED]> wrote:


Maybe the attached hack helps. Just make sure you don't keep it inside the path nosetests scans or it will spew a funky TypeError when trying to load the module when looking for tests in it. 

To use:

from TestCaseMod import *

test_foo():
failUnlessRaises(NotImplementedError, source.create )

Disclaimer: 
Minimally tested (sic)

that's a clever hack,I didn't knew that could be done.
but did you miss the email where I talk about the nose.tools.raises ?  they have most of TestCase methods implemented there was decorators. So I can write something like this in nose.

    @raises(NotImplementedError)
    def test_create(self):
        self.sourceManager.create ()

although this is a new feature so it's nose 0.9 or above.

HTH,
Alberto





--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to