-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Martin Pool wrote: >> IIUIC, note messages are no longer suppressed if --quiet is passed which is wrong. A simple if test added to note() ought to fix it? > > This is in fact broken; test added. > > > === modified file 'bzrlib/tests/test_trace.py' > --- bzrlib/tests/test_trace.py 2009-11-08 19:07:00 +0000 > +++ bzrlib/tests/test_trace.py 2009-12-10 05:43:18 +0000 > @@ -27,6 +27,8 @@ > > from bzrlib import ( > errors, > + trace, > + ui, > ) > from bzrlib.tests import TestCaseInTempDir, TestCase > from bzrlib.trace import ( > @@ -263,8 +265,19 @@ > # Confirm the old API still works > be_quiet(True) > self.assertEqual(-1, get_verbosity_level()) > + > + out = StringIO() > + err = StringIO() > + ui.ui_factory = ui.text.TextUIFactory(StringIO(''), out, err) > + trace.note("sample note") > + self.assertEqual('', out.getvalue()) > + self.assertEqual('', err.getvalue()) > + > be_quiet(False) > self.assertEqual(0, get_verbosity_level()) > + trace.note("sample note") > + self.assertEqual('', out.getvalue()) > + self.assertEqual('bzr: sample note', err.getvalue()) > > > class TestBzrLog(TestCaseInTempDir): > >
The test looks reasonable, though this doesn't show the fix :).
Also, it seems a bit of a shame not to have these isolated into separate tests.
John =:->
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAksgkKIACgkQJdeBCYSNAANulACdFGsbMowXmSC93j537PBhzY9U BlMAoMU0Od7MXnSYzkMuIgx139hcCUUp =qJdX -----END PGP SIGNATURE-----
« Back to merge proposal
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Pool wrote: tests/test_ trace.py' tests/test_ trace.py 2009-11-08 19:07:00 +0000 tests/test_ trace.py 2009-12-10 05:43:18 +0000 l(-1, get_verbosity_ level() ) TextUIFactory( StringIO( ''), out, err) l('', out.getvalue()) l('', err.getvalue()) level() ) l('', out.getvalue()) l('bzr: sample note', err.getvalue()) TestCaseInTempD ir):
>> IIUIC, note messages are no longer suppressed if --quiet is passed which is wrong. A simple if test added to note() ought to fix it?
>
> This is in fact broken; test added.
>
>
> === modified file 'bzrlib/
> --- bzrlib/
> +++ bzrlib/
> @@ -27,6 +27,8 @@
>
> from bzrlib import (
> errors,
> + trace,
> + ui,
> )
> from bzrlib.tests import TestCaseInTempDir, TestCase
> from bzrlib.trace import (
> @@ -263,8 +265,19 @@
> # Confirm the old API still works
> be_quiet(True)
> self.assertEqua
> +
> + out = StringIO()
> + err = StringIO()
> + ui.ui_factory = ui.text.
> + trace.note("sample note")
> + self.assertEqua
> + self.assertEqua
> +
> be_quiet(False)
> self.assertEqual(0, get_verbosity_
> + trace.note("sample note")
> + self.assertEqua
> + self.assertEqua
>
>
> class TestBzrLog(
>
>
The test looks reasonable, though this doesn't show the fix :).
Also, it seems a bit of a shame not to have these isolated into separate
tests.
John
=:->
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org/
gkKIACgkQJdeBCY SNAANulACdFGsbM owXmSC93j537PBh zY9U YzkMuIgx139hcCU Up
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAks
BlMAoMU0Od7MXnS
=qJdX
-----END PGP SIGNATURE-----