def gtf_(dataset_name, dataset_function, arg=None, docstr=None):
def test_function(self):<EOL><INDENT>with mock.patch(user_input, '<STR_LIT:Y>'):<EOL><INDENT>if arg is None:<EOL><INDENT>tester = DatasetTester(dataset_function)<EOL><DEDENT>else:<EOL><INDENT>tester = DatasetTester(dataset_function, arg)<EOL><DEDENT>tester.checkdims()<EOL><DEDENT><DEDENT>test_function.__name__ = '<STR_LIT>' + dataset_name<EOL>test_function.__doc__ = '<STR_LIT>' + dataset_name<EOL>return test_function<EOL>
Generate test function for testing the given data set.