

def test_single_factor(self):
    '\n        Test dependency resolution for a single factor.\n        '

    def check_output(graph):
        resolution_order = list(graph.ordered())
        self.assertEqual(len(resolution_order), 4)
        self.check_dependency_order(resolution_order)
        self.assertIn(AssetExists(), resolution_order)
        self.assertIn(SomeDataSet.foo, resolution_order)
        self.assertIn(SomeDataSet.bar, resolution_order)
        self.assertIn(SomeFactor(), resolution_order)
        self.assertEqual(graph.node[SomeDataSet.foo]['extra_rows'], 4)
        self.assertEqual(graph.node[SomeDataSet.bar]['extra_rows'], 4)
    for foobar in gen_equivalent_factors():
        check_output(TermGraph(to_dict([foobar])))

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