Soyuz-upload is too hairy

Bug #29639 reported by Celso Providelo
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

Andrew commented:
> * Finally, that this code is too complicated for a doctest. The doctest
> format is not well-suited to tests with this level of complexity. And test
> code this complex generally can't claim to be documentation either (if
> anything, you're documenting how the tests work, rather than the system that
> you're testing). You can, and should, be using unittest.TestCases for
> testing when that is appropriate. I think it is almost certainly
> appropriate here -- for instance, when I see multiple levels of indenting
> and asserts in a doctest, that's a very strong hint.

and

> As above: put it in a .py file, subclass unittest.TestCase, write test_foo
> methods. Doctests are a fine hammer, but not everything is a nail.

I can write this code, to simplify the soyuz-upload.txt test, as soon as I finished the soyuz deployment tests.

Celso Providelo (cprov)
Changed in launchpad-upload-and-queue:
assignee: nobody → cprov
status: Unconfirmed → Confirmed
Revision history for this message
Vikram Dhillon (dhillon-v10) wrote :

@ Celso Providelo: Any updates on this one, has this one already been fixed with the great UI 3.0 change.

Revision history for this message
Michael Nelson (michael.nelson) wrote :

Hi Vikram,

Looking under lib/lp/archiveuploader/tests/ seems to show that *lots* of the soyuz upload testing has now been moved to unit-tests, and soyuz-upload.txt no longer exists (although nascentupload*.txt do). So it looks like Celso put quite a lot of work in there (and we've continued to put new tests in those unit-tests). That said, I think there is quite a way to go before we're all confident with the soyuz test and documentation infrastructure.

I think we could consider this finished when the nascentupload*.txt files are truly just documentation, with most of their tests in unit-tests (for example nascentuploadfile.txt is still testing lots of corner cases, rather than documenting the process).

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Indeed - this bug is a huge change, it will just get chipped away at as time and opportunity permits.

Changed in soyuz:
assignee: Celso Providelo (cprov) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.