

def test_setattr_raises_on_nonexisting_attr(self):
    d = d.dtype()

    def _f():
        d.x = 1
    self.assertRaises(AttributeError, _f)

dataset/ETHPy150Open MongoEngine/mongoengine/tests/test_datastructures.py TestStrictDict.test_setattr_raises_on_nonexisting_attr/VarMisuse@12/22 `self`->`d`