removed pr.String and pr.Number in favor of the more general pr.Literal

This commit is contained in:
Dave Halter
2014-01-13 16:45:59 +01:00
parent 717c4315df
commit cdd356ff9b
3 changed files with 8 additions and 18 deletions

View File

@@ -37,15 +37,15 @@ class TestCallAndName():
def test_literal_type(self):
literal = self.get_call('1.0')
assert isinstance(literal, pr.Number)
assert isinstance(literal, pr.Literal)
assert type(literal.value) == float
literal = self.get_call('1')
assert isinstance(literal, pr.Number)
assert isinstance(literal, pr.Literal)
assert type(literal.value) == int
literal = self.get_call('"hello"')
assert isinstance(literal, pr.String)
assert isinstance(literal, pr.Literal)
assert literal.value == 'hello'