<s> """<STR_LIT>""" <EOL> import unittest <EOL> import time <EOL> import ast <EOL> import numpy as np <EOL> from sys import version_info <EOL> from utils import TestCase <EOL> from larch import Interpreter <EOL> class TestEval ( TestCase ) : <EOL> '''<STR_LIT>''' <EOL> def test_function1 ( self ) : <EOL> "<STR_LIT>" <EOL> self . trytext ( """<STR_LIT>""" ) <EOL> self . trytext ( "<STR_LIT>" ) <EOL> self . isValue ( "<STR_LIT:a>" , <NUM_LIT> ) <EOL> self . NoExceptionRaised ( ) <EOL> self . trytext ( "<STR_LIT>" ) <EOL> self . isValue ( "<STR_LIT:a>" , <NUM_LIT:3> ) <EOL> self . NoExceptionRaised ( ) <EOL> out , err = self . trytext ( "<STR_LIT>" ) <EOL> self . NoExceptionRaised ( ) <EOL> out = out . split ( '<STR_LIT:\n>' ) <EOL> self . assert_ ( out [ <NUM_LIT:0> ] . startswith ( '<STR_LIT>' ) ) <EOL> self . assert_ ( '<STR_LIT>' in out [ <NUM_LIT:1> ] ) <EOL> out , err = self . trytext ( "<STR_LIT>" ) <EOL> self . ExceptionRaised ( ) <EOL> errtype , errmsg = err [ <NUM_LIT:0> ] . get_error ( ) <EOL> errlines = errmsg . split ( '<STR_LIT:\n>' ) <EOL> self . assertTrue ( errtype == '<STR_LIT>' ) <EOL> out , err = self . trytext ( "<STR_LIT>" ) <EOL> self . ExceptionRaised ( ) <EOL> errtype , errmsg = err [ <NUM_LIT:0> ] . get_error ( ) <EOL> errmsgs = errmsg . split ( '<STR_LIT:\n>' ) <EOL> self . assertTrue ( errtype == '<STR_LIT>' ) <EOL> def test_function_vararg ( self ) : <EOL> "<STR_LIT>" <EOL> self . trytext ( """<STR_LIT>""" ) <EOL> self . NoExceptionRaised ( ) <EOL> self . trytext ( "<STR_LIT>" ) <EOL> self . NoExceptionRaised ( ) <EOL> self . isValue ( '<STR_LIT:o>' , <NUM_LIT> ) <EOL> out , err = self . trytext ( "<STR_LIT>" ) <EOL> out = out . split ( '<STR_LIT:\n>' ) <EOL> self . assert_ ( out [ <NUM_LIT:0> ] . startswith ( '<STR_LIT>' ) ) <EOL> def test_function_kwargs ( self ) : <EOL> "<STR_LIT>" <EOL> self . trytext ( """<STR_LIT>""" ) <EOL> self . NoExceptionRaised ( ) <EOL> out , err = self . trytext ( "<STR_LIT>" ) <EOL> self . NoExceptionRaised ( ) <EOL> out = out . split ( '<STR_LIT:\n>' ) <EOL> self . assert_ ( out [ <NUM_LIT:0> ] . startswith ( '<STR_LIT>' ) ) <EOL> self . trytext ( "<STR_LIT>" ) <EOL> self . NoExceptionRaised ( ) <EOL> self . isValue ( '<STR_LIT:o>' , <NUM_LIT:6> ) <EOL> self . trytext ( "<STR_LIT>" ) <EOL> self . NoExceptionRaised ( ) <EOL> self . isValue ( '<STR_LIT:o>' , <NUM_LIT> ) <EOL> self . trytext ( "<STR_LIT>" ) <EOL> self . NoExceptionRaised ( ) <EOL> self . isValue ( '<STR_LIT:o>' , <NUM_LIT:4> ) <EOL> out , err = self . trytext ( "<STR_LIT>" ) <EOL> self . ExceptionRaised ( ) <EOL> errtype , errmsg = err [ <NUM_LIT:0> ] . get_error ( ) <EOL> self . assertTrue ( errtype == '<STR_LIT>' ) <EOL> self . assertTrue ( '<STR_LIT>' in errmsg ) <EOL> def test_function_kwargs1 ( self ) : <EOL> "<STR_LIT>" <EOL> self . trytext ( """<STR_LIT>""" ) <EOL> out , err = self . trytext ( "<STR_LIT>" ) <EOL> out = out . split ( '<STR_LIT:\n>' ) <EOL> self . assert_ ( out [ <NUM_LIT:0> ] . startswith ( '<STR_LIT>' ) ) <EOL> self . trytext ( "<STR_LIT>" ) <EOL> self . isValue ( '<STR_LIT:o>' , <NUM_LIT:6> ) <EOL> self . NoExceptionRaised ( ) <EOL> self . trytext ( "<STR_LIT>" ) <EOL> self . isValue ( '<STR_LIT:o>' , <NUM_LIT> ) <EOL> self . NoExceptionRaised ( ) <EOL> def test_function_kwargs2 ( self ) : <EOL> "<STR_LIT>" <EOL> self . trytext ( """<STR_LIT>""" ) <EOL> out , err = self . trytext ( "<STR_LIT>" ) <EOL> self . NoExceptionRaised ( ) <EOL> out = out . split ( '<STR_LIT:\n>' ) <EOL> self . assert_ ( out [ <NUM_LIT:0> ] . startswith ( '<STR_LIT>' ) ) <EOL> self . trytext ( "<STR_LIT>" ) <EOL> self . NoExceptionRaised ( ) <EOL> self . trytext ( "<STR_LIT>" ) <EOL> self . isValue ( '<STR_LIT:o>' , <NUM_LIT:3> ) <EOL> self . NoExceptionRaised ( ) <EOL> self . trytext ( "<STR_LIT>" ) <EOL> self . isValue ( '<STR_LIT:o>' , <NUM_LIT:5> ) <EOL> self . NoExceptionRaised ( ) <EOL> self . trytext ( "<STR_LIT>" ) <EOL> self . isValue ( '<STR_LIT:o>' , <NUM_LIT:11> ) <EOL> self . NoExceptionRaised ( ) <EOL> self . trytext ( "<STR_LIT>" ) <EOL> self . isValue ( '<STR_LIT:o>' , <NUM_LIT:5> ) <EOL> self . NoExceptionRaised ( ) <EOL> self . trytext ( "<STR_LIT>" ) <EOL> self . isValue ( '<STR_LIT:o>' , <NUM_LIT:0> ) <EOL> self . NoExceptionRaised ( ) <EOL> self . trytext ( "<STR_LIT>" ) <EOL> self . isValue ( '<STR_LIT:o>' , <NUM_LIT:10> ) <EOL> self . NoExceptionRaised ( ) <EOL> self . trytext ( "<STR_LIT>" ) <EOL> self . isValue ( '<STR_LIT:o>' , <NUM_LIT:5> ) <EOL> self . NoExceptionRaised ( ) <EOL> out , err = self . trytext ( "<STR_LIT>" ) <EOL> self . ExceptionRaised ( ) <EOL> errtype , errmsg = err [ <NUM_LIT:0> ] . get_error ( ) <EOL> self . assertTrue ( errtype == '<STR_LIT>' ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> for suite in ( TestEval , ) : <EOL> suite = unittest . TestLoader ( ) . loadTestsFromTestCase ( suite ) <EOL> unittest . TextTestRunner ( verbosity = <NUM_LIT:2> ) . run ( suite ) </s>
