<s> import sys <EOL> if sys . version_info < ( <NUM_LIT:3> , <NUM_LIT:0> ) : <EOL> import testcase <EOL> else : <EOL> from . import testcase <EOL> class TestLargeFile ( testcase . TestCase ) : <EOL> title = "<STR_LIT>" <EOL> def test_large_file ( self ) : <EOL> text = '<STR_LIT>' <EOL> depth = <NUM_LIT:1> <EOL> for i in range ( <NUM_LIT:100> ) : <EOL> text += self . _test_text_title ( depth ) + '<STR_LIT:\n>' <EOL> text += self . _test_text_body ( ) + '<STR_LIT:\n>' <EOL> depth = <NUM_LIT:1> if depth == <NUM_LIT:5> else depth + <NUM_LIT:1> <EOL> self . set_settings ( { '<STR_LIT>' : '<STR_LIT:>>' } ) <EOL> self . set_syntax ( '<STR_LIT>' ) <EOL> self . set_text ( text ) <EOL> toc = self . get_plugin ( ) <EOL> toc . get_comment_titles ( ) <EOL> timers = toc . timers <EOL> for key in timers : <EOL> duration = "<STR_LIT>" . format ( timers [ key ] ) <EOL> self . assert_true ( <EOL> timers [ key ] < <NUM_LIT> , <EOL> '<STR_LIT:">' + key + '<STR_LIT>' + duration + '<STR_LIT>' <EOL> ) <EOL> def _test_text_title ( self , depth ) : <EOL> return '<STR_LIT>' + ( depth * '<STR_LIT:>>' ) + '<STR_LIT>' <EOL> def _test_text_body ( self ) : <EOL> return """<STR_LIT>""" </s>
