|
1 | 1 | [[chapter_12_organising_test_files]]
|
2 | 2 | == Splitting Our Tests into Multiple Files, and a Generic Wait Helper
|
3 | 3 |
|
4 |
| -// RITA: Reword/remove this warning since you have reviewed the chapter text in detail? |
5 |
| -.🚧 Warning, chapter update in progress |
6 |
| -******************************************************************************* |
7 |
| -This chapter is currently in the process of being rewritten for the 3e. |
8 |
| -
|
9 |
| -The code listings should all be valid, |
10 |
| -and work with Python3.12 + Django 4, |
11 |
| -but I haven't reviewed the chapter text in detail yet. |
12 |
| -
|
13 |
| -******************************************************************************* |
14 | 4 |
|
15 | 5 | Back to local development!
|
16 | 6 | The next feature we might like to implement is a little input validation.
|
@@ -894,10 +884,13 @@ Don't forget the "Refactor" in "Red, Green, Refactor"::
|
894 | 884 | ((("Red/Green/Refactor")))
|
895 | 885 |
|
896 | 886 | Don't refactor against failing tests::
|
897 |
| -// RITA: Why shouldn't you refactor against failing tests in general? A brief explanation would be nice here for clarity. |
898 |
| - * In general! |
899 |
| -// RITA: Please clarify the next line. It's somewhat ambiguous. Are you saying that you should refactor against failing tests in the FT you're currently working on? |
900 |
| - * But the FT you're currently working on doesn't count. |
| 887 | + * In general: refactoring against failing tests can easily introduce new |
| 888 | + issues and make it a lot more difficult to spot them. |
| 889 | + * Refactoring against failing FTs, however, is often necessary and excusable |
| 890 | + because FTs address user stories, focusing on the "what" in development. |
| 891 | + They cover extensive parts of the application, and aren't tightly tied to |
| 892 | + the code. Unlike unit tests, which focus on the "how" to implement the |
| 893 | + functionality, guiding the implementation more directly. |
901 | 894 | * You can occasionally put a skip on a test which is testing something you
|
902 | 895 | haven't written yet.
|
903 | 896 | * More commonly, make a note of the refactor you want to do, finish what
|
|
0 commit comments