Merge lp://qastaging/~nataliabidart/desktopcouch/remove-testtools into lp://qastaging/desktopcouch

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 250
Merged at revision: 250
Proposed branch: lp://qastaging/~nataliabidart/desktopcouch/remove-testtools
Merge into: lp://qastaging/desktopcouch
Diff against target: 429 lines (+75/-54)
13 files modified
desktopcouch/application/migration/tests/test_migration.py (+4/-4)
desktopcouch/application/tests/__init__.py (+23/-1)
desktopcouch/application/tests/test_local_files.py (+3/-2)
desktopcouch/application/tests/test_replication.py (+8/-7)
desktopcouch/application/tests/test_start_local_couchdb.py (+12/-16)
desktopcouch/records/tests/test_record.py (+4/-2)
desktopcouch/records/tests/test_server.py (+1/-3)
desktopcouch/recordtypes/contacts/tests/test_create.py (+2/-2)
desktopcouch/recordtypes/contacts/tests/test_record.py (+2/-2)
desktopcouch/recordtypes/contacts/tests/test_view.py (+6/-6)
desktopcouch/recordtypes/tests/test_bookmarks.py (+5/-5)
desktopcouch/recordtypes/tests/test_notes.py (+3/-2)
desktopcouch/recordtypes/tests/test_tasks.py (+2/-2)
To merge this branch: bzr merge lp://qastaging/~nataliabidart/desktopcouch/remove-testtools
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve
Eric Casteleijn (community) Approve
Review via email: mp+45309@code.qastaging.launchpad.net

Commit message

Removed testtools, replaced with unittest.

To post a comment you must log in.
Revision history for this message
Eric Casteleijn (thisfred) wrote :

I love it!

review: Approve
Revision history for this message
Robert Collins (lifeless) wrote :

Hi, I'm curious why you're dropping testtools as a dependency. Both
jml and I are eager maintainers and keep it maintained in Debian and
Ubuntu...

-Rob

Revision history for this message
Roberto Alsina (ralsina) wrote :

I trust Natalia on testing more than I trust myself, the code looks good and things still work, so +1.

review: Approve
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Hi Rob,

As you can see in the diff, testtools was only used to provide the TestCase class and nothing more, and from the TestCase class we only used methods that are provided by unittest.TestCase.

So, since unittest is part of Python's standard library will always be available in the Ubuntu main repo, which is very important for us since we ship packages in that repo and usually in the CD, where the space is tight and if we need to add a new dependency we need to follow a very strict process.

When possible, we try to stick to the dependencies we already have and/or already are on the Ubuntu CD, such as unittest and trial. This particular project already depends on unittest, twisted trial and mocker, so for this particular case I find testtools an extra dep that is not providing an irreplaceable functionality, and since is not installed by default, I personally don't see the gain of having it.

Don't get me wrong, I congratulate you two for maintaining testtools, I think you're doing an amazing job. Thanks!

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (30.6 KiB)

The attempt to merge lp:~nataliabidart/desktopcouch/remove-testtools into lp:desktopcouch failed. Below is the output from the failed tests.

Apache CouchDB has started, time to relax.
Browse your desktop CouchDB at file:///tmp/tmp52XGMs/data/couchdb.html
desktopcouch.application.tests.test_start_local_couchdb
  TestUpdateDesignDocuments
    test_create_databases_and_design_docs ... [OK]
desktopcouch.application.tests.test_service
  TestService
    test_start_desktopcouch_replication ... [OK]
    test_start_new_desktopcouch_extensions ... [OK]
    test_start_new_desktopcouch_no_extensions ... [OK]
desktopcouch.application.tests.test_local_files
  TestKeyringIntegration
    test_with_auth ... [OK]
    test_with_no_auth ... [OK]
  TestLocalFiles
    test_all_files_returned ... [OK]
    test_bind_address ... [OK]
    test_couch_chain_ini_files ... [OK]
    test_xdg_overwrite_works ... [OK]
desktopcouch.application.tests.test_replication
  TestReplication
    test_creation ... Apache CouchDB has started, time to relax.
Browse your desktop CouchDB at file:///tmp/tmpx1DDc_/data/couchdb.html
                                                     [OK]
  TestUbuntuoneReplication
    test_exclusion ... Apache CouchDB has started, time to relax.
Browse your desktop CouchDB at file:///tmp/tmpEYgxBc/data/couchdb.html
                                                    [OK]
desktopcouch.application.migration.tests.test_migration
  TestMigration
    test_migration_deleted_flag_to_trash ... [OK]
    test_migration_in_face_of_broken_records ... [OK]
    test_migration_script_is_run ... [OK]
    test_migration_script_is_run_and_can_access_view ... [OK]
  TestRegistration
    test_register_migration_is_added_to_the_registry ... [OK]
desktopcouch.application.platform.linux.tests.test_keyring
  TestGnomeKeyring
    test_get_aouth_no_keyring ... [OK]
    test_get_oauth_canceled_store ... [OK]
    test_get_oauth_data_stored ... [OK]
    test_get_user_name_password_keyring ... [OK]
    test_get_user_name_password_no_daemon ... [OK]
    test_get_user_name_password_not_in_keyring ... [OK]
    test_get_user_name_password_user_cancel ... [OK]
desktopcouch.application.platform.windows.tests.test_keyring
  TestKeyring
    test_get_oauth_data ... [OK]
    test_get_user_name_password ... [OK]
    test_get_user_name_password_no_key ... ...

250. By Natalia Bidart

Adding pylint disable for unittest naming convention.

Revision history for this message
Robert Collins (lifeless) wrote :

On Fri, Jan 7, 2011 at 1:12 AM, Naty Bidart
<email address hidden> wrote:
> Hi Rob,
>
> As you can see in the diff, testtools was only used to provide the TestCase class and nothing more, and from the TestCase class we only used methods that are provided by unittest.TestCase.
>
> So, since unittest is part of Python's standard library will always be available in the Ubuntu main repo, which is very important for us since we ship packages in that repo and usually in the CD, where the space is tight and if we need to add a new dependency we need to follow a very strict process.
>
> When possible, we try to stick to the dependencies we already have and/or already are on the Ubuntu CD, such as unittest and trial. This particular project already depends on unittest, twisted trial and mocker, so for this particular case I find testtools an extra dep that is not providing an irreplaceable functionality, and since is not installed by default, I personally don't see the gain of having it.
>
> Don't get me wrong, I congratulate you two for maintaining testtools, I think you're doing an amazing job. Thanks!

Hi, thanks for that feedback. I don't know if you are aware, but
python-testtools is in main - the bzr devs did a MIR for it a few
weeks ago so that bzr can run its test suite at build time. I don't
understand why you'd need your *build* deps on the CD - could you
expand on that?

One thing you may not know is that latest testtools can run both
regular python code tests and tests that need to do stuff with the
twisted reactor - it completely obsoletes twisted.trial now :)

Cheers,
Rob

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Hi Rob,

We don't need our build deps in the CD but in the main repo, for sure. And no, I wasn't aware that testtools was in main, that's very good to hear.

I wasn't aware that testtools now obsoletes trial, I guess we (in the whole Ubuntu One team) would have to review the use of trial, since is the runner that all the projects use.

Thanks for you answer!

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.

Subscribers

People subscribed via source and target branches