I never came into a good unit-test strategy for non-full stack operations. I do have a workaround.
I ended up using a bootstrapped command-line pyramid script. That starts up and manages a "Request" for me. I don't use pyramid_tm for database yet, so am a little unsure of this... but... I had really bad experiences with the setup/teardown approach you mention. There was a significant overhead on each setup from all the intialization routines. My solution was to make a bootstrapped API ( https://gist.github.com/jvanasco/7489276 ) All the tests are done within a single "IntegratedAPI()"; i call `request_new` and `request_finish` as needed to isolate everything. I"m not sure if this will work within a pyramid_tm environment. For my unit tests and misc offline work ( sending emails, analytics, etc ) this had an amazing speedup. I went from 1r/s to hundreds. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
