Attempt to fix transiently failing capsule TS test.

Guess here is that a flush is not occuring on that file because it is happening as part of garbage collection and not explictly as part of an explicit close.
This commit is contained in:
John Chilton
2015-12-26 12:37:21 +00:00
parent 7269f76e6e
commit 79bbc97a18
+2 -1
View File
@@ -539,7 +539,8 @@ class ShedTwillTestCase( TwillTestCase ):
self.submit_form( 'export_repository', 'export_repository_button' )
fd, capsule_filename = tempfile.mkstemp()
os.close( fd )
file( capsule_filename, 'w' ).write( self.last_page() )
with open( capsule_filename, 'w' ) as f:
f.write( self.last_page() )
return capsule_filename
def fill_review_form( self, review_contents_dict, strings_displayed=[], strings_not_displayed=[] ):