7
7
Command ,
8
8
)
9
9
10
+
10
11
class Chapter7Test (ChapterTest ):
11
- chapter_name = ' chapter_working_incrementally'
12
- previous_chapter = ' chapter_explicit_waits_1'
12
+ chapter_name = " chapter_working_incrementally"
13
+ previous_chapter = " chapter_explicit_waits_1"
13
14
14
15
def test_listings_and_commands_and_output (self ):
15
16
self .parse_listings ()
16
17
17
18
# sanity checks
18
- self .assertEqual (self .listings [0 ].type , ' code listing currentcontents' )
19
- self .assertEqual (self .listings [1 ].type , ' output' )
19
+ self .assertEqual (self .listings [0 ].type , " code listing currentcontents" )
20
+ self .assertEqual (self .listings [1 ].type , " output" )
20
21
21
22
# skips
22
- self .skip_with_check (40 , ' should show 4 changed files' ) # git
23
- self .skip_with_check (45 , ' add a message summarising' ) # git
24
- self .skip_with_check (63 , ' 5 changed files' ) # git
25
- self .skip_with_check (65 , ' forms x2' ) # git
26
- self .skip_with_check (92 , ' 3 changed files' ) # git
23
+ self .skip_with_check (40 , " should show 4 changed files" ) # git
24
+ self .skip_with_check (45 , " add a message summarising" ) # git
25
+ self .skip_with_check (63 , " 5 changed files" ) # git
26
+ self .skip_with_check (65 , " forms x2" ) # git
27
+ self .skip_with_check (92 , " 3 changed files" ) # git
27
28
touch_pos = 33
28
29
touch = self .listings [touch_pos ]
29
- assert ' touch' in touch
30
+ assert " touch" in touch
30
31
31
32
# other prep
32
33
self .start_with_checkout ()
33
- self .run_command (Command (' python3 manage.py migrate --noinput' ))
34
+ self .run_command (Command (" python3 manage.py migrate --noinput" ))
34
35
35
36
# hack fast-forward
36
37
skip = False
37
38
if skip :
38
39
self .pos = 106
39
- self .sourcetree .run_command ('git checkout {}' . format (
40
- self .sourcetree .get_commit_spec (' ch07l036-1' )
41
- ))
40
+ self .sourcetree .run_command (
41
+ "git checkout {}" . format ( self .sourcetree .get_commit_spec (" ch07l036-1" ) )
42
+ )
42
43
43
44
while self .pos < touch_pos :
44
45
print (self .pos )
45
46
self .recognise_listing_and_process_it ()
46
47
47
-
48
48
# special-case: we have a touch followed by some output.
49
49
# just do this one manually
50
50
if self .pos < touch_pos + 1 :
@@ -61,5 +61,5 @@ def test_listings_and_commands_and_output(self):
61
61
self .check_final_diff (ignore = ["moves" , "Generated by Django 1.11" ])
62
62
63
63
64
- if __name__ == ' __main__' :
64
+ if __name__ == " __main__" :
65
65
unittest .main ()
0 commit comments