<s> """<STR_LIT>""" <EOL> import re <EOL> import sys <EOL> import unittest <EOL> import param <EOL> from param . ipython import ParamPager <EOL> test1_repr = """<STR_LIT>""" <EOL> test2_repr = """<STR_LIT>""" <EOL> class TestParamPager ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . maxDiff = None <EOL> class TestClass ( param . Parameterized ) : <EOL> u = param . Number ( <NUM_LIT:4> ) <EOL> v = param . Number ( <NUM_LIT:4> , constant = True ) <EOL> w = param . Number ( <NUM_LIT:4> , readonly = True ) <EOL> x = param . String ( None , allow_None = True ) <EOL> y = param . Number ( <NUM_LIT:4> , bounds = ( - <NUM_LIT:1> , None ) ) <EOL> z = param . Number ( <NUM_LIT:4> , bounds = ( - <NUM_LIT:1> , <NUM_LIT:100> ) , softbounds = ( - <NUM_LIT:100> , - <NUM_LIT:200> ) ) <EOL> self . TestClass = TestClass <EOL> self . pager = ParamPager ( ) <EOL> def test_parameterized_class ( self ) : <EOL> page_string = self . pager ( self . TestClass ) <EOL> page_string = re . sub ( '<STR_LIT>' , '<STR_LIT>' , page_string ) <EOL> ref_string = re . sub ( '<STR_LIT>' , '<STR_LIT>' , test1_repr ) <EOL> try : <EOL> self . assertEqual ( page_string , ref_string ) <EOL> except Exception as e : <EOL> sys . stderr . write ( page_string ) <EOL> sys . stderr . write ( "<STR_LIT>" % page_string ) <EOL> raise e <EOL> def test_parameterized_instance ( self ) : <EOL> page_string = self . pager ( self . TestClass ( ) ) <EOL> page_string = re . sub ( '<STR_LIT>' , '<STR_LIT>' , page_string ) <EOL> ref_string = re . sub ( '<STR_LIT>' , '<STR_LIT>' , test2_repr ) <EOL> try : <EOL> self . assertEqual ( page_string , ref_string ) <EOL> except Exception as e : <EOL> sys . stderr . write ( page_string ) <EOL> sys . stderr . write ( "<STR_LIT>" % page_string ) <EOL> raise e </s>
