On Sep 10, 7:12 pm, Ben Bangert <[EMAIL PROTECTED]> wrote: > On Sep 10, 2007, at 2:13 PM, JP wrote: > > > I'd recommend sticking with a requirement of <= 0.9.9 until nose > > 0.10.0 final is out. The pre-releases are pre-releases because ... > > well, you know. :) > > > But I'd also ask, if you find a (pre- or otherwise) release of nose is > > buggy, please report those bugs! I don't see any bugs, open or closed, > > mentioning Pylons. I remember a couple from Ian Bicking that might be > > Pylons-related, but I'm just guessing. Certainly I didn't get any > > reports of 0.10a1 failing with Pylons itself or a basic Pylons > > project. > > > Nose's bug tracker is here: > > >http://code.google.com/p/python-nose/issues/list > > On a side note, I don't suppose there's a way to tell nose that > *before* it attempts to import everything in your project looking for > doctests... please run the following python code XXXXX. As some > modules in a Pylons project can't be loaded before the Pylons > environment is setup, this means one can't use doctests in a Pylons > project with nose.
Sure, you can do that easily with a plugin or a custom runner script. The plugin way will less convenient in nose 0.9.2 and earlier (those versions pre-date the use of setup.cfg for options). For a custom runner script, just do something like: import nose def main(): ### do whatever you want here, then nose.main() if __name__ == '__main__': nose.main() For a plugin, you'd implement begin() and put the initialization code there. Either way, the init code will run before any discovery/ imports. I can elaborate on the plugin solution a bit tomorrow if there's any interest. For the moment, though, I must go change a diaper (not my own ;). JP --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---