Code review comment for lp:~macslow/unity8/shellRotation

Revision history for this message
Leo Arias (elopio) wrote :

Some things to fix are in the inline comments.

Also, for consistency, please change all your " for '.

And the two tests you added are too big. We need to keep the tests short, making one action and doing one assertion at the end. When you repeat actions and have assertion in the middle is a bad small.

You can improve the readability of those two tests and improve defect localization by using scenarios. Put something like this as an attribute of the test case for the first test:

scenarios = [
    ('top up', {'orientation': 1}),
...
    ('left up', {'orientation': 2}),
]

Make a new test case for the second test and use something like:

scenarios = [
    ('top up, angle 0', {'orientation': 1, 'angle': 0}),
...
    ('left up, angle 270', {'orientation': 2, 'angle': 270}),
]

The test will be run as many times as scenarios you have defined.
And the values will be accessible in self.orientation and self.angle.

If you need help with the scenarios, drop into #ubuntu-quality and ping the vanguard.

Thanks for working on this!

review: Needs Fixing

« Back to merge proposal