[PATCH] Re: Feature Request: 'bzr mv --after' to tell bzr that file(s) have already been moved in the working tree

Andrew Bennetts andrew at canonical.com
Tue Nov 7 00:50:04 GMT 2006


John Arbash Meinel wrote:
[...]
> Which means that our server thread isn't cleaning up at the right time,
> because it is cleaning up during interpreter shutdown. We should
> probably fix it to not cause errors during that time, as well as working
> hard to make sure the thread gets stopped when we are done using it,
> rather than hanging around until it is killed by interpreter shutdown.

We should be able to make the test runner notice if there are threads left over
after a test completes.  Something like:

    threads_before = set(threading.enumerate())
    test.run(result)
    threads_after = set(threading.enumerate())
    new_threads = threads_after - threads_before
    if new_threads:
       warn('test %r left these threads running: %r' % (test, new_threads))

The Zope 3 test runner reports this sort of thing (presumably via a mechanism
like this), and it's quite helpful.

-Andrew.





More information about the bazaar mailing list