def test_parser_caseinsensitive1(): '''Check that the test for the existance of a builtin call in a use statement is case insensitive. ''' parser = Parser() use = Use_Stmt("use my_mod, only : SETVAL_X") parser.update_arg_to_module_map(use) with pytest.raises(ParseError) as excinfo: parser.create_builtin_kernel_call("SetVal_X", None) assert "A built-in cannot be named in a use statement" \ in str(excinfo.value)
def test_parser_caseinsensitive1(): '''Check that the test for the existance of a builtin call in a use statement is case insensitive. ''' from fparser.two import Fortran2003 as f2003 from fparser.two.parser import ParserFactory ParserFactory().create(std="f2003") parser = Parser() use = f2003.Use_Stmt("use my_mod, only : SETVAL_X") parser.update_arg_to_module_map(use) with pytest.raises(ParseError) as excinfo: parser.create_builtin_kernel_call("SetVal_X", None) assert "A built-in cannot be named in a use statement" \ in str(excinfo.value)