Best Python code snippet using slash
test_ctypes.py
Source:test_ctypes.py  
...288            wp.mat44(1.0, 2.0, 3.0, 4.0,289                    5.0, 6.0, 7.0, 8.0,290                    9.0, 10.0, 11.0, 12.0,291                    13.0, 14.0, 15.0, 16.0)]292    add_function_test(TestCTypes, "test_mat22", test_mat22, devices=devices)293    add_function_test(TestCTypes, "test_mat33", test_mat33, devices=devices)294    add_function_test(TestCTypes, "test_mat44", test_mat44, devices=devices)295    add_kernel_test(TestCTypes, name="test_scalar_arg_types", kernel=test_scalar_arg_types, dim=1, inputs=[-64, 255, -64, 255, -64, 255, -64, 255, 3.14159, 3.14159], devices=devices)296    add_kernel_test(TestCTypes, name="test_vector_arg_types", kernel=test_vector_arg_types, dim=1, inputs=inputs, devices=devices)297    add_function_test(TestCTypes, "test_scalar_array_load", test_scalar_array_types, devices=devices, load=True, store=False)298    add_function_test(TestCTypes, "test_scalar_array_store", test_scalar_array_types, devices=devices, load=False, store=True)299    add_function_test(TestCTypes, "test_vec2_arg", test_vec2_arg, devices=devices, n=8)300    add_function_test(TestCTypes, "test_vec2_transform", test_vec2_transform, devices=devices, n=8)301    add_function_test(TestCTypes, "test_vec3_arg", test_vec3_arg, devices=devices, n=8)302    add_function_test(TestCTypes, "test_vec3_transform", test_vec3_transform, devices=devices, n=8)303    add_function_test(TestCTypes, "test_transform_multiply", test_transform_multiply, devices=devices, n=8)304    add_kernel_test(TestCTypes, name="test_transform_matrix", kernel=test_transform_matrix, dim=1, devices=devices)305    add_function_test(TestCTypes, "test_scalar_array", test_scalar_array, devices=devices)306    add_function_test(TestCTypes, "test_vector_array", test_vector_array, devices=devices)307    return TestCTypes308if __name__ == '__main__':309    c = register(unittest.TestCase)...test_closest_point_edge_edge.py
Source:test_closest_point_edge_edge.py  
...136        137    devices = wp.get_devices()138    class TestClosestPointEdgeEdgeMethods(parent):139        pass140    add_function_test(TestClosestPointEdgeEdgeMethods, "test_edge_edge_middle_crossing", test_edge_edge_middle_crossing, devices=devices)141    add_function_test(TestClosestPointEdgeEdgeMethods, "test_edge_edge_parallel_s1_t0", test_edge_edge_parallel_s1_t0, devices=devices)142    add_function_test(TestClosestPointEdgeEdgeMethods, "test_edge_edge_parallel_s0_t1", test_edge_edge_parallel_s0_t1, devices=devices)143    add_function_test(TestClosestPointEdgeEdgeMethods, "test_edge_edge_both_degenerate_case", test_edge_edge_both_degenerate_case, devices=devices)144    add_function_test(TestClosestPointEdgeEdgeMethods, "test_edge_edge_degenerate_first_edge", test_edge_edge_degenerate_first_edge, devices=devices)145    add_function_test(TestClosestPointEdgeEdgeMethods, "test_edge_edge_degenerate_second_edge", test_edge_edge_degenerate_second_edge, devices=devices)146    add_function_test(TestClosestPointEdgeEdgeMethods, "test_edge_edge_parallel", test_edge_edge_parallel, devices=devices)147    add_function_test(TestClosestPointEdgeEdgeMethods, "test_edge_edge_perpendicular_s1_t0", test_edge_edge_perpendicular_s1_t0, devices=devices)148    add_function_test(TestClosestPointEdgeEdgeMethods, "test_edge_edge_perpendicular_s0_t1", test_edge_edge_perpendicular_s0_t1, devices=devices)149    return TestClosestPointEdgeEdgeMethods150if __name__ == '__main__':    151    c = register(unittest.TestCase)...test_launch.py
Source:test_launch.py  
...51def register(parent):52    devices = wp.get_devices()53    class TestLaunch(parent):54        pass55    add_function_test(TestLaunch, "test_1d_launch", test1d, devices=devices)56    add_function_test(TestLaunch, "test_2d_launch", test2d, devices=devices)57    add_function_test(TestLaunch, "test_3d_launch", test3d, devices=devices)58    add_function_test(TestLaunch, "test_4d_launch", test4d, devices=devices)59    return TestLaunch60if __name__ == '__main__':61    c = register(unittest.TestCase)...Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!
