Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mlin committed May 12, 2019
1 parent 2685311 commit 1bd2df1
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions tests/test_1doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1746,6 +1746,44 @@ def test_decl(self):
doc = WDL.parse_document(doc)
doc.typecheck()

doc = r"""
version 1.0
workflow UsePerson {
Person p
}
struct Person {
String name
Array[Person] circular
}
"""
doc = WDL.parse_document(doc)
with self.assertRaises(WDL.Error.CircularDependencies):
doc.typecheck()

doc = r"""
version 1.0
workflow UsePerson {
Person p
}
struct Person {
String name
Array[Car] cars
}
struct Car {
String make
String model
Person owner
}
"""
doc = WDL.parse_document(doc)
with self.assertRaises(WDL.Error.CircularDependencies):
doc.typecheck()

def test_import(self):
doc = r"""
version 1.0
Expand Down

0 comments on commit 1bd2df1

Please sign in to comment.