

def testIncludes(self):
    test_data = '\n    # general comment\n    #include a  # end of line comment\n    #includedir b\n    #includeis now a comment\n    '
    contents = StringIO.StringIO(test_data)
    config = config_file.SudoersParser()
    result = list(config.Parse(None, contents, None))
    self.assertListEqual(list(result[0].includes), ['a', 'b'])
    self.assertListEqual(list(result[0].entries), [])

dataset/ETHPy150Open google/grr/grr/parsers/config_file_test.py SudoersParserTest.testIncludes/original