[RFC] why for bzrlib.__init__.py has function test_suite()?

John Arbash Meinel john at arbash-meinel.com
Fri May 4 17:45:56 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
> bzrlib.__init__.py has function test_suite():
> 
> def test_suite():
>     import tests
>     return tests.test_suite()
> 
> Why for it needed?
> 
> Annotation point me back to the end of 2005 year.
> Robert and John touched this code last time.
> 
> I'd like to remove this code, because I want to not
> include our test suite to standalone bzr.exe.
> Our current test suite has size about of 3MB
> (of 6.5MB total size of bzrlib). I expect that resulting
> standalone installer without test suite will reduce
> his size off 500KB-1MB.
> 
> [µ]
> 

Because a 3rd party test tool (not bzr selftest) would expect it to be
there.

I think Robert occasionally runs the bzrlib test suite through one of
the GUI test runners, just to make sure that we maintain TestSuite
compatibility. (We intend to be mostly compatible with plain unittest.
our TestSkipped show up as Errored tests, and similarly for
knownFailure, etc, but we don't have a lot of control over that).

I would certainly argue that the code is crufty. It should at least be
doing "import bzrlib.tests" or "from bzrlib import tests".

I would guess that we could get rid of it, but I don't see why it would
cause problems for you.

You have to use some sort of special case to get rid of "bzr selftest"
anyway.

(This is assuming that the reason you are having problems removing
'bzrlib/tests' is because the python => exe you are using is noticing
some missing imports. But we import bzrlib.tests in other places anyway.)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGO2NEJdeBCYSNAAMRAth0AJ0RiJUlRbIQX4tU3lGgyNyX6KVqVACcCLhM
eaR/NZ8WVtkOuUC3pniAePw=
=OVRX
-----END PGP SIGNATURE-----



More information about the bazaar mailing list