Commits

Carl Friedrich Bolz  committed d729b27 Draft

an explicit test for None

  • Participants
  • Parent commits 5c8ae55

Comments (0)

Files changed (1)

     b.a = ASub()
     b.a.y = 1.2
     assert b.a.y == 1.2
+
+def test_class_and_none():
+    class A(r.RPyObject):
+        x = r.attribute(int)
+    class B(r.RPyObject):
+        a = r.attribute(A)
+
+    b = B()
+    assert b.a is None
+    a = b.a = A()
+    assert b.a is a
+    b.a = None
+    assert b.a is None