oh, sorry, forgot this.
you need to register a cleanup for each event you add, such as:
def setUp(self):
event.listen(SomeThing, "some_event", my_handler)
self.addCleanup(event.remove, SomeThing, "some_event", my_handler)
or whatever mechanism your test suite provides.
There of course is a way to clear out event handlers globally but
SQLAlchemy reserves the right to use its own handlers internally and
these can't be cleared out without breaking the library.
On Fri, Jul 7, 2017 at 3:07 PM, Антонио Антуан <
a.ch...@gmail.com> wrote:
> Looks like it is not possible, isn't it?
>
> --
> SQLAlchemy -
> The Python SQL Toolkit and Object Relational Mapper
>
>
http://www.sqlalchemy.org/
>
> To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See
http://stackoverflow.com/help/mcve for a full description.
> ---
> 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
sqlalchemy+...@googlegroups.com.
> To post to this group, send email to
sqlal...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/sqlalchemy.
> For more options, visit
https://groups.google.com/d/optout.