'Assert that calling pipeline_output after initialize raises correctly.'

def test_pipeline_output_after_initialize(self):

    def initialize(context):
        attach_pipeline(Pipeline(), 'test')
        pipeline_output('test')
        raise AssertionError("Shouldn't    make    it    past    pipeline_output()")
    def handle_data(context, data):
        raise AssertionError("Shouldn't    make    it    past    initialize!")
    def before_trading_start(context, data):
        raise AssertionError("Shouldn't    make    it    past    initialize!")
    algo = TradingAlgorithm(initialize=initialize, handle_data=handle_data, before_trading_start=before_trading_start, data_frequency='daily', get_pipeline_loader=(lambda column: self.pipeline_loader), start=(self.first_asset_start - self.trading_day), end=(self.last_asset_end + self.trading_day), env=self.env)
    with self.assertRaises(PipelineOutputDuringInitialize):
        algo.run(self.data_portal)
