<s> import unittest <EOL> from ... compatibility import StringIO <EOL> from ... workbook import Workbook <EOL> class TestWriteCalcPr ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> self . fh = StringIO ( ) <EOL> self . workbook = Workbook ( ) <EOL> self . workbook . _set_filehandle ( self . fh ) <EOL> def test_write_calc_pr ( self ) : <EOL> """<STR_LIT>""" <EOL> self . workbook . _write_calc_pr ( ) <EOL> exp = """<STR_LIT>""" <EOL> got = self . fh . getvalue ( ) <EOL> self . assertEqual ( got , exp ) <EOL> def test_calc_mode_auto_except_tables ( self ) : <EOL> """<STR_LIT>""" <EOL> self . workbook . set_calc_mode ( "<STR_LIT>" ) <EOL> self . workbook . _write_calc_pr ( ) <EOL> exp = """<STR_LIT>""" <EOL> got = self . fh . getvalue ( ) <EOL> self . assertEqual ( got , exp ) <EOL> def test_calc_mode_manual ( self ) : <EOL> """<STR_LIT>""" <EOL> self . workbook . set_calc_mode ( "<STR_LIT>" ) <EOL> self . workbook . _write_calc_pr ( ) <EOL> exp = """<STR_LIT>""" <EOL> got = self . fh . getvalue ( ) <EOL> self . assertEqual ( got , exp ) <EOL> def test_write_calc_pr ( self ) : <EOL> """<STR_LIT>""" <EOL> self . workbook . set_calc_mode ( "<STR_LIT>" , <NUM_LIT> ) <EOL> self . workbook . _write_calc_pr ( ) <EOL> exp = """<STR_LIT>""" <EOL> got = self . fh . getvalue ( ) <EOL> self . assertEqual ( got , exp ) <EOL> def tearDown ( self ) : <EOL> self . workbook . fileclosed = <NUM_LIT:1> </s>
