@@ -51,7 +51,20 @@ def check_example(package, filename):
51
51
before_listing = set (os .listdir (actual .path ))
52
52
call ([runner , filename ], stdout = output , stderr = STDOUT )
53
53
after_listing = set (os .listdir (actual .path ))
54
-
54
+
55
+ # check the console output
56
+ output .seek (0 )
57
+ actual_output = output .read ().strip ().replace ('\r ' , '' )
58
+ for re , rp in sub_res :
59
+ actual_output = re .sub (rp , actual_output )
60
+ expected_path = expected_base + '.txt'
61
+ if not path .exists (expected_path ):
62
+ expected_output = ''
63
+ else :
64
+ expected_output = open (expected_path ).read ().strip ().replace ('\r ' , '' )
65
+ compare (expected_output , actual_output )
66
+
67
+ # check the files created
55
68
created = after_listing .difference (before_listing )
56
69
57
70
expected_names = set ()
@@ -79,18 +92,9 @@ def check_example(package, filename):
79
92
80
93
for name in expected_names :
81
94
if name != '.svn' :
95
+ print created
82
96
raise AssertionError ("expected output missing: %s" % name )
83
97
84
- output .seek (0 )
85
- actual_output = output .read ().strip ().replace ('\r ' , '' )
86
- for re , rp in sub_res :
87
- actual_output = re .sub (rp , actual_output )
88
- expected_path = expected_base + '.txt'
89
- if not path .exists (expected_path ):
90
- expected_output = ''
91
- else :
92
- expected_output = open (expected_path ).read ().strip ().replace ('\r ' , '' )
93
- compare (expected_output , actual_output )
94
98
95
99
finally :
96
100
os .chdir (initial )
0 commit comments