#NEWLINE# @ pytest . fixture ( scope = 'module' , params = [ 'gpu' ] ) #NEWLINE# def backend_gpu( request ) : #NEWLINE# #INDENT# '\n    Fixture to setup the backend before running a test.  Also registers the teardown function to\n    clean up the backend after a test is done.  This has module scope, so this will be run once\n    for each test in a given test file (module).\n\n    This fixture is parameterized to run both the cpu and gpu backends for every test\n    ' #NEWLINE# be = get_backend ( request ) #NEWLINE# def cleanup( ) : #NEWLINE# #INDENT# be = request . getfuncargvalue ( 'backend_gpu' ) #NEWLINE# del be #NEWLINE# #UNINDENT# request . addfinalizer ( cleanup ) #NEWLINE# return be