Skip to content

Commit b811a7c

Browse files
authored
Merge pull request #374 from Xronophobe/csanad-review--chapter-26
Csanád's review of chapter 26
2 parents 1460b64 + 7b1cb8e commit b811a7c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

chapter_26_page_pattern.asciidoc

+16
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,27 @@ It can be used as an alternative to the `tearDown` function as a way of
105105
cleaning up resources used during the test. It's most useful when the resource
106106
is only allocated halfway through a test, so you don't have to spend time in
107107
`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.
108115

109116
`addCleanup` is run after `tearDown`, which is why we need that
110117
`try/except` formulation for `quit_if_possible`; whichever of `edith_browser`
111118
and `oni_browser` is also assigned to `self.browser` at the point at which the
112119
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.
113125

114126
We'll also need to move `create_pre_authenticated_session` from
115127
'test_my_lists.py' into 'base.py'.
128+
// CSANAD: I would add why: "so that we can use it with both FT -s".
116129

117130
OK, let's see if that all works:
118131

@@ -463,6 +476,9 @@ If you'd like a bit more help, here's an outline of the steps you could take:
463476

464477
1. We'll need a new section in _list.html_, with, at first,
465478
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." ?
466482
That should get the FT one step further.
467483

468484
2. Next, we'll need a view for the form to submit to.

0 commit comments

Comments
 (0)