Merge lp:~gz/bzr-git/trivial_use_knownFailure_method into lp:bzr-git

Proposed by Martin Packman
Status: Merged
Merged at revision: 1359
Proposed branch: lp:~gz/bzr-git/trivial_use_knownFailure_method
Merge into: lp:bzr-git
Diff against target: 29 lines (+2/-3)
1 file modified
tests/test_blackbox.py (+2/-3)
To merge this branch: bzr merge lp:~gz/bzr-git/trivial_use_knownFailure_method
Reviewer Review Type Date Requested Status
bzr-git developers Pending
Review via email: mp+74027@code.launchpad.net

Description of the change

Per bzrlib.tests the KnownFailure exception class is deprecated, but the knownFailure method on TestCase works as a replacement. This also avoids incompatibilities with Python 2.7 unittest changes, see bug 607400 for more information.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/test_blackbox.py'
2--- tests/test_blackbox.py 2011-09-03 14:09:07 +0000
3+++ tests/test_blackbox.py 2011-09-04 19:43:23 +0000
4@@ -30,7 +30,6 @@
5 )
6
7 from bzrlib.tests.blackbox import ExternalBase
8-from bzrlib.tests import KnownFailure
9
10 from bzrlib.plugins.git import (
11 tests,
12@@ -100,7 +99,7 @@
13 self.simple_commit()
14
15 if bzrlib_version < (2, 4):
16- raise KnownFailure("bzr info uses inventory on bzr < 2.4")
17+ self.knownFailure("bzr info uses inventory on bzr < 2.4")
18
19 output, error = self.run_bzr(['info', '-v'])
20 self.assertEqual(error, '')
21@@ -110,7 +109,7 @@
22 self.assertTrue("repository: Git Repository" in output)
23
24 def test_push_roundtripping(self):
25- raise KnownFailure("roundtripping is not yet supported")
26+ self.knownFailure("roundtripping is not yet supported")
27 self.with_roundtripping()
28 os.mkdir("bla")
29 GitRepo.init(os.path.join(self.test_dir, "bla"))

Subscribers

People subscribed via source and target branches

to all changes: