-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Michael Bayer ha scritto: > [...] >> A precisation. >> >> The reason I used the sa_only flag is because I assumed there was a >> reason why test cases not derived from testing.TestBase must be ignored. >> >> If possible, the wantMethod should be something like: >> >> if not issubclass(cls, testing.TestBase): >> # Skip >> return None >> else: >> if (hasattr(cls, '__whitelist__') and testing.db.name in >> cls.__whitelist__): >> return True >> else: >> return not self.__should_skip_for(cls) >> >> >> Another problem I found when using SQLAlchemy nose plugin is that >> warnings are configured to raise exceptions, and this is a problem for me. > > OK my thought here is that yeah, this is likely a problem for you,
Right now, fortunately, I have solved all the problems. And the only thing I use from SQLA plugin is testing.db, so that I don't have to hard write the database to use. I would like to use support for skipping test for specified dialects, but it is not a big issue (and given the way nose plugins work, I can not use the SQLA plugin implementation). > [...] >> >> By the way: what is the reason why testing.Test does not derive from >> unittest.TestCase? > > nose doesn't require unittest. Ideally we would be able to run tests that > don't derive from any class at all. I have a bad experience with this, using nose. In my code I use functions like setup_testing_defaults, and by default nose try to execute it as a test. The first time I used nose, I got several failure and I took some time to understand what was going on. I had to write a custom plugin, to change this. Another advantace of using UnitTest classes, is that test execution can be pretty printed in a tree (I liked the output produced by twisted.trial, and I have tried to reproduce it for nose). > [...] > Since nose has taken a deep dive into the "its author can't support it > anymore" category, I was not aware of nose state. > I'm waiting for the next de-facto test library (nose2 i think it was called > ?) If I remember correctly there is an unittest2 project for the standard library. Regards Manlio -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkv21a8ACgkQscQJ24LbaURjuQCeO1GG8kXxUwOODIEtkZxe+AW3 ZtMAn14kktUZOpa5ar0tkZbXwAjM13I0 =Sny0 -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.