I don't see the problem with your doctest usage, but what makes you believe that the code you show below produces exactly 9 dots?
strangely enough, re-working the code to this
>>> import time, threading
>>> def example():
... thread.out = []
... for i in range(9): thread.out.append(".")
>>> thread = threading.Thread(None, example)
>>> thread.running = True; thread.start()
>>> time.sleep(.1)
>>> thread.running = False
>>> print thread.out
['.', '.', '.', '.', '.', '.', '.', '.', '.']
makes the test "succeed" (though it can fail for some of the same reasons the
original test isn't guaranteed to give 9 dots either).
Jeff
pgpzCyHhOP4G4.pgp
Description: PGP signature
-- http://mail.python.org/mailman/listinfo/python-list
