@@ -105,14 +105,27 @@ It can be used as an alternative to the `tearDown` function as a way of
105
105
cleaning up resources used during the test. It's most useful when the resource
106
106
is only allocated halfway through a test, so you don't have to spend time in
107
107
`tearDown` figuring out what does or doesn't need cleaning up.
108
+ // CSANAD: since in the next paragraph (and in the docs) we say addCleanup is
109
+ // run after tearDown I find it unclear what the benefit is, or what the
110
+ // last sentence means (no need to figure out what needs to be cleaned up).
111
+ // From the docs, this seems to be the clear benefit of using addCleanup.
112
+ // "If setUp() fails, meaning that tearDown() is not called, then any cleanup
113
+ // functions added will still be called."
114
+ // Maybe this explanation could be clearer why we need it here.
108
115
109
116
`addCleanup` is run after `tearDown`, which is why we need that
110
117
`try/except` formulation for `quit_if_possible`; whichever of `edith_browser`
111
118
and `oni_browser` is also assigned to `self.browser` at the point at which the
112
119
test ends will already have been quit by the `tearDown` function.
120
+ // CSANAD: despite this explanation I still find it unclear why we need
121
+ // try/except or how it would work (e.g. what would prevent the browser from
122
+ // closing (that would end up raising an exception) or why we need to call
123
+ // `browser.quit` from both the cleanUp here, and from the base class
124
+ // FunctionalTest's tearDown method.
113
125
114
126
We'll also need to move `create_pre_authenticated_session` from
115
127
'test_my_lists.py' into 'base.py'.
128
+ // CSANAD: I would add why: "so that we can use it with both FT -s".
116
129
117
130
OK, let's see if that all works:
118
131
@@ -463,6 +476,9 @@ If you'd like a bit more help, here's an outline of the steps you could take:
463
476
464
477
1. We'll need a new section in _list.html_, with, at first,
465
478
a form with an input box for an email address.
479
+ // CSANAD: IMO for a non-native speaker (myself included) this reads a little
480
+ // difficult. Maybe "We'll need a new section in list.html, initially with a
481
+ // form with an input box for an email address." ?
466
482
That should get the FT one step further.
467
483
468
484
2. Next, we'll need a view for the form to submit to.
0 commit comments