Re: [sqlalchemy] Getting the entity name, ideally the ORM class in the shard selector?

2013-04-23 Thread Rob Fowler
So anyone else who asks this knows, the following works: A query with just a column: qq = session.query(Configuration.name) Normally I would loop, but in this case, taking just the first column: yy = qq.column_descriptions[0]['expr'] yy.expression.table.name gives: ''configurations”

Re: [sqlalchemy] Testing sqlalchemy applications

2013-04-23 Thread Simon King
On Tue, Apr 23, 2013 at 6:54 AM, Paradox para...@pobox.com wrote: I have a question related to sqlalchemy and testing, not sure if this is the best place to ask so let me know if I am asking here in error. I am trying to learn to write and run tests using py.test. Currently I am working on a

Re: [sqlalchemy] Testing sqlalchemy applications :p:

2013-04-23 Thread Paradox
On 04/23/2013 04:31 PM, Simon King wrote: On Tue, Apr 23, 2013 at 6:54 AM, Paradox para...@pobox.com wrote: I have a question related to sqlalchemy and testing, not sure if this is the best place to ask so let me know if I am asking here in error. I am trying to learn to write and run tests

Re: [sqlalchemy] Testing sqlalchemy applications :p:

2013-04-23 Thread Сергей Панов
What do sqlalchemy users usually use for testing? I am willing to learn other ways to do this that are more suited to the packages. thomas we use unittest you can see how to setup session here https://github.com/vice-versa/sacrud/blob/master/sacrud/tests/__init__.py

Re: [sqlalchemy] Testing sqlalchemy applications :p:

2013-04-23 Thread Simon King
On Tue, Apr 23, 2013 at 2:08 PM, Paradox para...@pobox.com wrote: On 04/23/2013 04:31 PM, Simon King wrote: On Tue, Apr 23, 2013 at 6:54 AM, Paradox para...@pobox.com wrote: I have a question related to sqlalchemy and testing, not sure if this is the best place to ask so let me know if I