

def testEmptySourceData(self):
    test_data = '# comment 1\nbaseurl=\n# Trailing whitespace on purpose\nbaseurl=      \n# Trailing whitespace on purpose\nbaseurl =            \nbaseurl\n# comment 2\n'
    file_obj = StringIO.StringIO(test_data)
    pathspec = rdf_paths.PathSpec(path='/etc/yum.repos.d/emptytest.repo')
    stat = rdf_client.StatEntry(pathspec=pathspec)
    parser = config_file.YumPackageSourceParser()
    results = list(parser.Parse(stat, file_obj, None))
    result = [d for d in d if isinstance(d, rdf_protodict.AttributedDict)][0]
    self.assertEqual('/etc/yum.repos.d/emptytest.repo', result.filename)
    self.assertEqual(0, len(result.uris))

dataset/ETHPy150Open google/grr/grr/parsers/config_file_test.py YumPackageSourceParserTests.testEmptySourceData/VarMisuse@76/174 `results`->`d`