示例#1
0
 def test_number_is_int(self):
     lexer = Lexer('3')
     result = lexer.number()
     assert result == Token('INTEGER', 3)
示例#2
0
 def test_number_is_float(self):
     lexer = Lexer('3.2')
     result = lexer.number()
     assert result == Token('FLOAT', 3.2)