On Nov 9, 2007, at 11:37 AM, Chris McDonough wrote:

On Nov 9, 2007, at 9:43 AM, Jim Fulton wrote:

Yawn. IMO, the test command in setuptools is a waste of time, because it doesn't work with anything else.

It runs all the tests, even the doctests, if thats what you mean. See the "additional_tests" hair in the test modules.

My point is that the meta data you added to the setup.py only works with setup.py. It isn't accessible to any other test runners. I shouldn't have yawned. It is significant that the tests work. :) I just don't find this way of running the tests to be useful. The first time I work on this package, I'll add a buildout.cfg so I can use the Zope test runner. At that point, I'll have to deal with these extra requirements in another way (which is no big deal).

What if we caused setup.py to read a buildout.cfg for the tests_require package names and we passed these in as tests_require= names? Would that make it all better?

Too complicated.  :)

Again, this isn't a big deal. You've done the hard work of figuring out what's required. You even reduced the requirements. I can't ask for more. In fact, from what you've written below, nothing there aren't any extra requirements if the Zope test runner is used, as it will already cause zope.testing to be required.

zope.interface is a real requirement. It is already in test_requires.

Over time, we need to clean up the transaction tests so they don't use ZODB.

Yeah, given that we're name this thing "transaction", it's an actually an immediate requirement.

If you are going to spend the time, then, uh, sure. ;) Seriously, while I would love to see this cleaned up, I don't think I would consider this super urgent. I guess that depends on competing priorities.

I just deleted the sections of the test_transaction doctests that depended on ZODB. They were actually not really testing transactions, they were testing persistent object behavior. I'll try to put them back in a form within ZODB proper, as the test really are testing ZODB functionality, not transaction functionality.

Way cool.

There's only one test that uses anything that can't be mocked up in the transaction package (it uses an actual MappingStorage and a DB) itself. It also happens to be the one that fails right now; I haven't tried to understand it yet.

Gah. BTW, if you haven't already, you should check for transaction tests lurking in the other ZODB packages.

Good idea.

In the meantime, I've gotten rid of 'zope.transaction' and I've created a new top-level 'transaction' package at http:// svn.zope.org/transaction/ . All its tests pass. It depends only on 'zope.interface', and requires 'zope.testing' for running the tests.


I think you are pretty close to done -- if not done. Much thanks. I wish there was a way to state anti-requirements in setuptools. Then we could say that transaction had an anti-requirement for ZODB3 < 3.9.

BTW, it would be nice to now remove the transaction package from the ZODB trunk and make it a dependency.


Jim Fulton
Zope Corporation

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to