On Jun 7, 2013, at 3:29 AM, Victor Varvariuc <[email protected]> wrote:
> > 1. The tests code uses apilib.Session, while the tests use self.session. well depends on what you're testing, if the tests go out to logic which refers to the global apilib.Session, that's fine > 2. Looks like if in code some does an additional session.rollback(), all the > enclosing transaction is rolled back, and all objects created in setUp() > (which use self.session) are lost. yeah this whole recipe does not accomodate tests that do a rollback() in the middle, then continue going. > 3. Did i do correctly that i made the tested code use the session with test > connection in transaction? Otherwise i guess sessions in the tested code and > test itself would be in different transactions, and the tested code would not > see changes made in setUp() seems like ? > 4. Is this the best pattern for our needs? shrugs ? -- You received this message because you are subscribed to the Google Groups "sqlalchemy" 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/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
