1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00

test less-copacetic cases

This commit is contained in:
Patrick Thomson 2018-07-16 11:36:17 -04:00
parent e05f419314
commit 5c8cd4a109
3 changed files with 18 additions and 0 deletions

View File

@ -35,3 +35,11 @@ spec = describe "call graphing" $ do
res <- callGraphPythonProject ["test/fixtures/python/graphing/conditional/conditional.py"] res <- callGraphPythonProject ["test/fixtures/python/graphing/conditional/conditional.py"]
unGraph res `shouldSatisfy` hasVertex (Variable "merle") unGraph res `shouldSatisfy` hasVertex (Variable "merle")
unGraph res `shouldSatisfy` hasVertex (Variable "taako") unGraph res `shouldSatisfy` hasVertex (Variable "taako")
it "should continue even when a type error is encountered" $ do
res <- callGraphPythonProject ["test/fixtures/python/graphing/typeerror/typeerror.py"]
unGraph res `shouldSatisfy` hasVertex (Variable "lup")
it "should continue when an unbound variable is encountered" $ do
res <- callGraphPythonProject ["test/fixtures/python/graphing/unbound/unbound.py"]
unGraph res `shouldSatisfy` hasVertex (Variable "lucretia")

View File

@ -0,0 +1,5 @@
var = 1 + "thing"
def lup(): pass
lup()

View File

@ -0,0 +1,5 @@
var = thing + 1
def lucretia(): pass
lucretia()