I was writing these tests to find out what triggered the bug, and when it was fixed. Using self.knownFailure means the problem code is never actually run. With self.expectFailure instead, the code *is* run, and if it starts passing (after the merge in the second rev for instance) then you get an unexpected success (but see bug 654474) instead. An expectError method could also fail if the error type changes.
With lp:~gz/bzr/smart_add_former_file_dir_251864 merged as well, this rather ugly assertion adapter code is removed as the test starts passing and it's not needed any more.
I was writing these tests to find out what triggered the bug, and when it was fixed. Using self.knownFailure means the problem code is never actually run. With self.expectFailure instead, the code *is* run, and if it starts passing (after the merge in the second rev for instance) then you get an unexpected success (but see bug 654474) instead. An expectError method could also fail if the error type changes.
With lp:~gz/bzr/smart_add_former_file_dir_251864 merged as well, this rather ugly assertion adapter code is removed as the test starts passing and it's not needed any more.