Fix old python2 test issue.
The map function returns a list in python2, but not in python3. Force the test in cpp.py get_blocks() function to return a list. Test: All cpp.py unit tests pass. Change-Id: I1a63b92ac6cdb785830846fbd7e726eca7520e96
This commit is contained in:
parent
462c542855
commit
e0cb4e1094
|
@ -1647,7 +1647,7 @@ class BlockParserTests(unittest.TestCase):
|
|||
|
||||
def get_blocks(self, lines):
|
||||
blocks = BlockParser().parse(CppStringTokenizer('\n'.join(lines)))
|
||||
return map(lambda a: str(a), blocks)
|
||||
return list(map(lambda a: str(a), blocks))
|
||||
|
||||
def test_hash(self):
|
||||
self.assertEqual(self.get_blocks(["#error hello"]), ["#error hello"])
|
||||
|
|
Loading…
Reference in New Issue