

def test_single_factor_instance_args(self):
    '\n        Test dependency resolution for a single factor with arguments passed to\n        the constructor.\n        '
    (bar, buzz) = (SomeDataSet.bar, SomeDataSet.buzz)
    graph = TermGraph(to_dict([SomeFactor([bar, buzz], window_length=5)]))
    resolution_order = list(graph.ordered())
    self.assertEqual(len(resolution_order), 4)
    self.check_dependency_order(resolution_order)
    self.assertIn(AssetExists(), resolution_order)
    self.assertEqual(graph.extra_rows[AssetExists()], 4)
    self.assertIn(bar, resolution_order)
    self.assertIn(buzz, resolution_order)
    self.assertIn(SomeFactor([bar, buzz], window_length=5), resolution_order)
    self.assertEqual(graph.extra_rows[bar], 4)
    self.assertEqual(graph.extra_rows[buzz], 4)

dataset/ETHPy150Open quantopian/zipline/tests/pipeline/test_term.py DependencyResolutionTestCase.test_single_factor_instance_args/original