Rev 4661: Let user decide what command is used to run the test suite. in file:///home/vila/src/bzr/bugs/419950-selftest-can-be-aliased/

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Aug 28 08:09:17 BST 2009


At file:///home/vila/src/bzr/bugs/419950-selftest-can-be-aliased/

------------------------------------------------------------
revno: 4661
revision-id: v.ladeuil+lp at free.fr-20090828070916-9crsuhep0bosqpz8
parent: pqm at pqm.ubuntu.com-20090828064033-q7eyzxnnyc3jcpag
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 419950-selftest-can-be-aliased
timestamp: Fri 2009-08-28 09:09:16 +0200
message:
  Let user decide what command is used to run the test suite.
  
  * bzrlib/tests/test_crash.py:
  Fix imports.
  (TestApportReporting): _test_needs_features is enough, no need for
  setUp().
  (TestApportReporting.test_apport_report_contents): Check that
  there is a CommandLine filed, no need to check which command was
  used.
-------------- 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 07:09:16 +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 feattures
+
+
+class TestApportReporting(tests.TestCase):
+
+    _test_needs_features = [features.ApportFeature]
 
     def test_apport_report_contents(self):
         try:
@@ -39,8 +36,7 @@
         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,
@@ -54,4 +50,4 @@
             'test_apport_report_contents')
         # should also be in there
         self.assertContainsRe(report,
-            '(?m)^CommandLine:.*selftest')
+            '(?m)^CommandLine:')



More information about the bazaar-commits mailing list