Rev 4662: Don't restrict the command name used to run the test suite in http://bazaar.launchpad.net/~vila/bzr/integration

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Aug 28 13:40:54 BST 2009


At http://bazaar.launchpad.net/~vila/bzr/integration

------------------------------------------------------------
revno: 4662 [merge]
revision-id: v.ladeuil+lp at free.fr-20090828124042-mi667dg14r0qpksf
parent: pqm at pqm.ubuntu.com-20090828074203-nmpg23fc16tqzbxf
parent: v.ladeuil+lp at free.fr-20090828123801-3qoacc7k9pkzaxnh
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: integration
timestamp: Fri 2009-08-28 14:40:42 +0200
message:
  Don't restrict the command name used to run the test suite
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/tests/test_crash.py     test_crash.py-20090820042958-jglgza3wrn03ha9e-2
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2009-08-28 05:00:33 +0000
+++ b/NEWS	2009-08-28 07:09:16 +0000
@@ -18,6 +18,9 @@
 Bug Fixes
 *********
 
+* Don't restrict the command name used to run the test suite.
+  (Vincent Ladeuil, #419950)
+
 Improvements
 ************
 

=== modified file 'bzrlib/tests/test_crash.py'
--- a/bzrlib/tests/test_crash.py	2009-08-20 04:45:48 +0000
+++ b/bzrlib/tests/test_crash.py	2009-08-28 12:38:01 +0000
@@ -18,20 +18,17 @@
 from StringIO import StringIO
 import sys
 
-
-from bzrlib.crash import (
-    report_bug,
-    _write_apport_report_to_file,
+from bzrlib import (
+    crash,
+    tests,
     )
-from bzrlib.tests import TestCase
-from bzrlib.tests.features import ApportFeature
-
-
-class TestApportReporting(TestCase):
-
-    def setUp(self):
-        TestCase.setUp(self)
-        self.requireFeature(ApportFeature)
+
+from bzrlib.tests import features
+
+
+class TestApportReporting(tests.TestCase):
+
+    _test_needs_features = [features.ApportFeature]
 
     def test_apport_report_contents(self):
         try:
@@ -39,19 +36,13 @@
         except AssertionError, e:
             pass
         outf = StringIO()
-        _write_apport_report_to_file(sys.exc_info(),
-            outf)
+        crash._write_apport_report_to_file(sys.exc_info(), outf)
         report = outf.getvalue()
 
-        self.assertContainsRe(report,
-            '(?m)^BzrVersion:')
+        self.assertContainsRe(report, '(?m)^BzrVersion:')
         # should be in the traceback
-        self.assertContainsRe(report,
-            'my error')
-        self.assertContainsRe(report,
-            'AssertionError')
-        self.assertContainsRe(report,
-            'test_apport_report_contents')
+        self.assertContainsRe(report, 'my error')
+        self.assertContainsRe(report, 'AssertionError')
+        self.assertContainsRe(report, 'test_apport_report_contents')
         # should also be in there
-        self.assertContainsRe(report,
-            '(?m)^CommandLine:.*selftest')
+        self.assertContainsRe(report, '(?m)^CommandLine:')



More information about the bazaar-commits mailing list