Merge lp://qastaging/~mbp/bzr/760435-unittest-deprecations into lp://qastaging/bzr

Proposed by Martin Pool
Status: Merged
Approved by: John A Meinel
Approved revision: no longer in the source branch.
Merged at revision: 5788
Proposed branch: lp://qastaging/~mbp/bzr/760435-unittest-deprecations
Merge into: lp://qastaging/bzr
Diff against target: 1824 lines (+257/-251)
53 files modified
bzrlib/tests/__init__.py (+4/-2)
bzrlib/tests/blackbox/test_export.py (+17/-17)
bzrlib/tests/blackbox/test_init.py (+1/-1)
bzrlib/tests/blackbox/test_merge.py (+1/-1)
bzrlib/tests/blackbox/test_non_ascii.py (+4/-4)
bzrlib/tests/blackbox/test_remerge.py (+1/-1)
bzrlib/tests/blackbox/test_too_much.py (+9/-9)
bzrlib/tests/blackbox/test_versioning.py (+8/-8)
bzrlib/tests/per_branch/test_bound_sftp.py (+5/-5)
bzrlib/tests/per_branch/test_branch.py (+6/-6)
bzrlib/tests/per_bzrdir/test_bzrdir.py (+4/-4)
bzrlib/tests/per_controldir/test_controldir.py (+11/-11)
bzrlib/tests/per_controldir_colo/test_supported.py (+1/-1)
bzrlib/tests/per_repository/test_has_same_location.py (+1/-1)
bzrlib/tests/per_repository/test_repository.py (+2/-2)
bzrlib/tests/per_transport.py (+40/-40)
bzrlib/tests/per_tree/test_get_file_mtime.py (+1/-1)
bzrlib/tests/per_workingtree/test_commit.py (+1/-1)
bzrlib/tests/per_workingtree/test_executable.py (+6/-6)
bzrlib/tests/per_workingtree/test_pull.py (+3/-3)
bzrlib/tests/per_workingtree/test_workingtree.py (+3/-3)
bzrlib/tests/test_branch.py (+1/-1)
bzrlib/tests/test_bundle.py (+1/-1)
bzrlib/tests/test_bzrdir.py (+3/-3)
bzrlib/tests/test_cache_utf8.py (+15/-15)
bzrlib/tests/test_commit.py (+3/-3)
bzrlib/tests/test_config.py (+6/-6)
bzrlib/tests/test_diff.py (+1/-1)
bzrlib/tests/test_ftp_transport.py (+2/-2)
bzrlib/tests/test_generate_ids.py (+2/-2)
bzrlib/tests/test_globbing.py (+2/-2)
bzrlib/tests/test_inv.py (+3/-3)
bzrlib/tests/test_lazy_import.py (+2/-2)
bzrlib/tests/test_lazy_regex.py (+1/-1)
bzrlib/tests/test_lockdir.py (+5/-5)
bzrlib/tests/test_lru_cache.py (+7/-7)
bzrlib/tests/test_merge.py (+2/-2)
bzrlib/tests/test_merge_core.py (+2/-2)
bzrlib/tests/test_osutils.py (+12/-12)
bzrlib/tests/test_plugins.py (+14/-14)
bzrlib/tests/test_registry.py (+6/-6)
bzrlib/tests/test_repository.py (+1/-1)
bzrlib/tests/test_revisionspec.py (+1/-1)
bzrlib/tests/test_selftest.py (+14/-14)
bzrlib/tests/test_sftp_transport.py (+1/-1)
bzrlib/tests/test_smart_add.py (+3/-3)
bzrlib/tests/test_store.py (+4/-4)
bzrlib/tests/test_transform.py (+2/-2)
bzrlib/tests/test_transport.py (+3/-3)
bzrlib/tests/test_tuned_gzip.py (+1/-1)
bzrlib/tests/test_version_info.py (+3/-3)
bzrlib/tests/test_workingtree.py (+1/-1)
doc/en/release-notes/bzr-2.4.txt (+4/-0)
To merge this branch: bzr merge lp://qastaging/~mbp/bzr/760435-unittest-deprecations
Reviewer Review Type Date Requested Status
John A Meinel Approve
Review via email: mp+57810@code.qastaging.launchpad.net

Commit message

stop using failIf, failUnless, etc

Description of the change

python2.7 has softly deprecated some unittest methods like failIf, failUnless, failUnlessEqual. You only get the deprecation with -Werror, which make check turns on. I think it's worth replacing them anyhow for the sake of avoiding pointless variation.

The changes are basically mechanical. In a couple of cases I changed failUnless(instance(...)) to assertIsInstance.

There is still failUnlessExists that we've defined ourselves, but for the sake of keeping the diff simple I have not changed them yet.

To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 4/15/2011 8:03 AM, Martin Pool wrote:
> Martin Pool has proposed merging lp:~mbp/bzr/760435-unittest-deprecations into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
> Related bugs:
> Bug #760435 in Bazaar: "failUnless & co cause PendingDeprecationWarning"
> https://bugs.launchpad.net/bzr/+bug/760435
>
> For more details, see:
> https://code.launchpad.net/~mbp/bzr/760435-unittest-deprecations/+merge/57810
>
> python2.7 has softly deprecated some unittest methods like failIf, failUnless, failUnlessEqual. You only get the deprecation with -Werror, which make check turns on. I think it's worth replacing them anyhow for the sake of avoiding pointless variation.
>
> The changes are basically mechanical. In a couple of cases I changed failUnless(instance(...)) to assertIsInstance.
>
> There is still failUnlessExists that we've defined ourselves, but for the sake of keeping the diff simple I have not changed them yet.

since I already approved the branch based on this:

 merge: approve

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2n9xEACgkQJdeBCYSNAAMmhQCfXJAMdCl6W5VEQJ/LVrrkoeIm
KHQAn1fDeUggnRm3mSoC7RAWqcyzUfQk
=OTXW
-----END PGP SIGNATURE-----

review: Approve
Revision history for this message
Martin Pool (mbp) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.