

def test_parameterized_term(self):

    class SomeFactorParameterized(SomeFactor):
        params = ('a', 'b')
    f = SomeFactorParameterized(a=1, b=2)
    self.assertEqual(f.params, {
        'a': 1,
        'b': 2,
    })
    g = SomeFactorParameterized(a=1, b=3)
    h = SomeFactorParameterized(a=2, b=2)
    self.assertDifferentObjects(f, g, h)
    f2 = SomeFactorParameterized(a=1, b=2)
    f3 = SomeFactorParameterized(b=2, a=1)
    self.assertSameObject(f, f2, f3)
    self.assertEqual(f.params['a'], 1)
    self.assertEqual(f.params['b'], 2)
    self.assertEqual(f.window_length, SomeFactor.window_length)
    self.assertEqual(f.inputs, tuple(SomeFactor.inputs))

dataset/ETHPy150Open quantopian/zipline/tests/pipeline/test_term.py ObjectIdentityTestCase.test_parameterized_term/original