Strange test failure in test_selftest on vanilla bzr.dev

John Arbash Meinel john at arbash-meinel.com
Mon Mar 12 15:27:46 GMT 2007


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

Aaron Bentley wrote:
> Hi all,
> 
> I've got a test case failure in a vanilla copy of bzr.dev.  This
> shouldn't be happening.  Probably indicates a platform difference
> between my (Edgy) laptop and PQM.
> 
> $ ./bzr selftest test_selftest
>        bzr: /home/abentley/bzr/bzr.dev/bzr
>     bzrlib: /home/abentley/bzr/bzr.dev/bzrlib
> 
> [56/75 in 2s] blackbox.test_selftest.TestOptions.test_transport
> 
> ----------------------------------------------------------------------
> Ran 1 test in 0.002s

Something weird is going on here. Your above statement says that "Ran 1
test in 0.002s" is printed when you run "bzr selftest".

v- This is just looking for the "Ran 1 test" line. But if you  look at
the output, it isn't there.


> ======================================================================
> FAIL: test_transport (bzrlib.tests.blackbox.test_selftest.TestOptions)
> 
> vvvv[log from
> bzrlib.tests.blackbox.test_selftest.TestOptions.test_transport]-
> run bzr: ['selftest', '--transport=sftp', 'test_transport_set_to_sftp']
> bzr arguments: ['selftest', '--transport=sftp',
> 'test_transport_set_to_sftp']
> encoding stdout as sys.stdout encoding 'UTF-8'
>     INFO  tests passed
> output:
> '       bzr: /home/abentley/bzr/bzr.dev/bzr\n    bzrlib:
> /home/abentley/bzr/bzr.dev/bzrlib\n\n'
> errors:
> 'tests passed\n'
> 
> ^^^^[log from
> bzrlib.tests.blackbox.test_selftest.TestOptions.test_transport]-
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File
> "/home/abentley/bzr/bzr.dev/bzrlib/tests/blackbox/test_selftest.py",
> line 77, in test_transport
>     self.assertContainsRe(stdout, 'Ran 1 test')
>   File "/home/abentley/bzr/bzr.dev/bzrlib/tests/__init__.py", line 751,
> in assertContainsRe
>     raise AssertionError('pattern "%r" not found in "%r"'
> AssertionError: pattern "'Ran 1 test'" not found in "'       bzr:
> /home/abentley/bzr/bzr.dev/bzr\n    bzrlib:
> /home/abentley/bzr/bzr.dev/bzrlib\n\n'"
> 
> ----------------------------------------------------------------------
> Ran 75 tests in 7.680s
> 
> FAILED (failures=1)
> tests failed



My best guess is that stdout isn't getting flushed properly. Which is
really weird considering that stdout should be a StringIO object.

Notice that you have the setup portion:

       bzr: /home/abentley/bzr/bzr.dev/bzr
    bzrlib: /home/abentley/bzr/bzr.dev/bzrlib

And you even have the 'test passed' line. But you don't have the "Ran 1
test in X.XXXs".


And when I run 'bzr selftest' it always reports that line. Even if it is
'Ran 0 tests'.

So while it could be a pqm thing, it seems to be something weird.

It isn't running a different bzr, because self.capture doesn't spawn a
subprocess. So this seems like a genuine failure somewhere, which should
be investigated.

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

iD8DBQFF9XFyJdeBCYSNAAMRAqCgAJ9LgWpDWqqm/0K7KNAhgBN0AlWLBwCfQr4Y
05Z3wM15d91WenTcs5rLunI=
=NfkS
-----END PGP SIGNATURE-----



More information about the bazaar mailing list