Test fix: most exprs no longer have types

This commit is contained in:
Reid 'arrdem' McKenzie 2020-07-18 21:02:03 -06:00
parent 2122a15759
commit fef3df7f64

View file

@ -33,17 +33,17 @@ def test_analyze_constants(txt, exprtype):
assert isinstance(a.analyzes(txt), exprtype) assert isinstance(a.analyzes(txt), exprtype)
@pytest.mark.parametrize('txt, exprtype, rettype', [ @pytest.mark.parametrize('txt', [
('()', a.ListExpr, None), '()',
('(list)', a.ListExpr, None), '(list)',
('(list 1)', a.ListExpr, a.BuiltinType.INTEGER), '(list 1)',
('(do 1)', a.DoExpr, a.BuiltinType.INTEGER), '(do 1)',
('(do foo bar 1)', a.DoExpr, a.BuiltinType.INTEGER), '(do foo bar 1)',
('(let [a 1] 1)', a.LetExpr, a.BuiltinType.INTEGER), '(let [a 1, b 2] 1)',
('(fn [] 1)', a.FnExpr, a.BuiltinType.INTEGER), '(fn [] 1)',
('(fn [] ⊢ integer? x)', a.FnExpr, p.SymbolToken('integer?', None, None)), '(fn [] ⊢ integer? x)',
'(fn [] x |- integer?)',
]) ])
def test_analyze_rettype(txt, exprtype, rettype): def test_analyze(txt):
"""Make sure that do exprs work.""" """Make sure that do exprs work."""
assert isinstance(a.analyzes(txt), exprtype) assert a.analyzes(txt)
assert a.analyzes(txt).type == rettype