Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
Change-Id: I579b20da3f5d49054823392be80aaf78a055f596
  • Loading branch information
lhutton1 committed May 29, 2020
1 parent fb5f7ff commit 53b4198
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/python/relay/test_ir_text_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,15 @@ def @main[A]() -> fn (A, List[A]) -> List[A] {
assert main_def_str.strip() in mod_str


def test_null_attribute():
x = relay.var("x")
y = relay.var("y")
z = relay.Function([x], y)
z = z.with_attr("TestAttribute", None)
txt = astext(z)
assert "TestAttribute=(nullptr)" in txt


if __name__ == "__main__":
do_print[0] = True
test_lstm()
Expand All @@ -262,3 +271,4 @@ def @main[A]() -> fn (A, List[A]) -> List[A] {
test_variable_name()
test_call_node_order()
test_unapplied_constructor()
test_null_attribute()

0 comments on commit 53b4198

Please sign in to comment.