<s> from copperhead import * <EOL> import numpy as np <EOL> import unittest <EOL> from create_tests import create_tests <EOL> @ cu <EOL> def test_shift ( x , amount , boundary ) : <EOL> return shift ( x , amount , boundary ) <EOL> class ShiftTest ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . source = [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> , <NUM_LIT:4> , <NUM_LIT:5> ] <EOL> def run_test ( self , target , fn , * args ) : <EOL> python_result = fn ( * args , target_place = places . here ) <EOL> copperhead_result = fn ( * args , target_place = target ) <EOL> self . assertEqual ( list ( python_result ) , list ( copperhead_result ) ) <EOL> @ create_tests ( * runtime . backends ) <EOL> def testShiftP ( self , target ) : <EOL> self . run_test ( target , test_shift , self . source , <NUM_LIT:2> , <NUM_LIT:3> ) <EOL> @ create_tests ( * runtime . backends ) <EOL> def testShiftN ( self , target ) : <EOL> self . run_test ( target , test_shift , self . source , - <NUM_LIT:2> , <NUM_LIT:4> ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
