Blackbox tests not being run

Andrew Bennetts andrew at canonical.com
Mon Feb 6 14:34:59 GMT 2006


John A Meinel wrote:
[...]
> 
> I was thinking an alternative test, which would just check for any files
> named "test_*" underneath the tests directory. And make sure that they
> were all loaded. That also helps with the "accidentally deleting a test
> because of a merge conflict."
> 
> However, if we write that, I have to wonder why we aren't just grabbing
> all files named test_*.py and automatically including them in the tests.
> It would mean less maintenance work when writing new tests.

Twisted's test tool (trial) does this, and it works very well for us.  Writing a
test is a simple as putting a test_*.py file in a tests/ directory and putting a
TestCase in it.  Running all the tests is just "trial twisted".

I find dead chickens like test_suite constantly irritating after being used to
the convenience of trial.  So I'm +1 for automatically finding tests.

-Andrew.

p.s. random fact, "trial bzrlib" finds 554 tests, with 2 failures and 20 errors,
     vs. "bzrlib selftest" which finds 742 tests, with just 1 failure -- and
     requires me to enter my gpg passphrase.  (using jbailey's 0.8~200601300703
     deb)





More information about the bazaar mailing list