def testStructureHeaderToken(self): # fold>> data = FileSnippets.structureHeader()+"\n" writeToTestFile(data) tokens = GRRM.tokenizeOutFile(testFilePath()) self.assertEqual(len(tokens), 1) self.assertEqual(tokens[0].__class__, Tokens.StructureHeaderToken)
def testStructureHeaderToken(self): # fold>> data = FileSnippets.structureHeader() writeToTestFile(data) reader = FileReader.FileReader(testFilePath()) start_pos = reader.currentPos() token = Tokens.StructureHeaderToken.match(reader) self.assertEqual(token.__class__, Tokens.StructureHeaderToken) self.assertEqual(reader.currentPos(), start_pos + 1) self.assertEqual(token.type(), "DC") self.assertEqual(token.number(), 1) self.assertEqual(token.symmetry(), "C1")