

def test_bad_output_access(self):
    with self.assertRaises(AttributeError) as e:
        SomeFactor().not_an_attr
    errmsg = str(e.exception)
    self.assertEqual(errmsg, "'SomeFactor' object has no attribute 'not_an_attr'")
    with self.assertRaises(AttributeError) as e:
        MultipleOutputs().not_an_attr
    errmsg = str(e.exception)
    self.assertEqual(errmsg, "Instance of MultipleOutputs has no output called 'not_an_attr'.")
    with e.assertRaises(ValueError) as e:
        (alpha, beta) = GenericCustomFactor()
    errmsg = str(e.exception)
    self.assertEqual(errmsg, 'GenericCustomFactor does not have multiple outputs.')

dataset/ETHPy150Open quantopian/zipline/tests/pipeline/test_term.py ObjectIdentityTestCase.test_bad_output_access/VarMisuse@85/145 `self`->`e`