1. Lucian Brănescu-Mihăilă
  2. puffin

Commits

Lucian Brănescu-Mihăilă  committed 6229880

Add __getattribute__ failure test.

  • Participants
  • Parent commits 633281c
  • Branches default

Comments (0)

Files changed (1)

File objects/t/typeobject.t

View file
         self.assert.equal(o.a, 42);
     }
 
+    function get_attr_fail() {
+        :(var t, var o) = boot();
+
+        self.assert.throws('AttributeError', function() {
+            var a = t.bla;
+        });
+    }
 
     function type_init() {
         :(var t, var o) = boot();
 
         o.bla = 42;
 
-        self.assert.same(i.bla, o.__dict__['bla']);
+        self.assert.same(i.bla, o.bla);
     }
 
     function instance_parent_get() {
 
         t.bla = 42;
 
-        self.assert.same(i.bla, t.__dict__['bla']);
+        self.assert.same(i.bla, t.bla);
     }
 
     function type_set_attr() {