public void testClassTypeBuiltinAttrs() throws Exception {
String file = "classtype_builtins.py";
buildIndex(file);
NModuleType module = (NModuleType)idx.moduleTable.lookupType(abspath(file));
Scope mtable = module.getTable();
assertTrue(mtable.lookupType("MyClass").isClassType());
assertTrue(mtable.lookupType("MyClassNoDoc").isClassType());
assertTrue(mtable.lookupType("MyClass").getTable().getParent() == mtable);
assertEquals(NBinding.Kind.CLASS, mtable.lookup("MyClass").getKind());
Scope t = mtable.lookupType("MyClass").getTable();
assertTrue(t.lookupType("__bases__").isTupleType());
assertTrue(t.lookupType("__dict__").isDictType());
assertEquals(idx.builtins.BaseStr, t.lookupType("__name__"));
assertEquals(idx.builtins.BaseStr, t.lookupType("__module__"));
assertEquals(idx.builtins.BaseStr, t.lookupType("__doc__"));
t = mtable.lookupType("MyClassNoDoc").getTable();
assertEquals(idx.builtins.BaseStr, t.lookupType("__doc__"));
}