<s> """<STR_LIT>""" <EOL> from __future__ import unicode_literals <EOL> from nose . tools import ok_ <EOL> import pyqrcode <EOL> class KeepTrackOfClose ( ) : <EOL> def __init__ ( self ) : <EOL> self . is_closed = False <EOL> def write ( self , x ) : <EOL> pass <EOL> def close ( self ) : <EOL> self . is_closed = True <EOL> def test_donot_close_png ( ) : <EOL> code = pyqrcode . create ( '<STR_LIT:a>' ) <EOL> out = KeepTrackOfClose ( ) <EOL> code . png ( out ) <EOL> ok_ ( not out . is_closed ) <EOL> def test_donot_close_svg ( ) : <EOL> code = pyqrcode . create ( '<STR_LIT:a>' ) <EOL> out = KeepTrackOfClose ( ) <EOL> code . svg ( out ) <EOL> ok_ ( not out . is_closed ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> import nose <EOL> nose . core . runmodule ( ) </s>
