That's an interesting point. I actually pull it in as an imported class using @as_declarative() class MyClass
Forcing an import reload for each initialization made all the difference. Thanks for your help. On Monday, March 9, 2020 at 4:19:31 PM UTC-7, Mike Bayer wrote: > > > > On Mon, Mar 9, 2020, at 5:40 PM, Don Smiley wrote: > > In unit testing with multiple configurations, I am having trouble closing > out everything to go on to the next iteration. For example, the test > creates a class Address. I get the following kind of error: > > ``` > /venv/lib/python3.6/site-packages/SQLAlchemy-1.3.13-py3.6-linux-x86_64.egg/sqlalchemy/ext/declarative/clsregistry.py", > > line 97, in attempt_get\n % (".".join(path + > [key]))\nsqlalchemy.exc.InvalidRequestError: Multiple classes found for > path "Address" in the registry of this declarative base. Please use a fully > module-qualified path.\n') > > > > that error refers to the declarative base class. If your tests set up new > mappers against a Base each time,, you should use a new Base for each test > run that sets up those mappers. otherwise you will get conflicting names > like above. > > > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/b5bec3b4-952a-4a65-834a-b02f69b0fe1f%40googlegroups.com.