'Ensure that we can run an algo with pipeline beyond the max date
of the daily bars.'

def test_pipeline_beyond_daily_bars(self):

    count = [0]
    current_day = self.trading_calendar.next_session_label(self.pipeline_loader.raw_price_loader.last_available_dt)
    def initialize(context):
        pipeline = attach_pipeline(Pipeline(), 'test')
        vwap = VWAP(window_length=10)
        pipeline.add(vwap, 'vwap')
        pipeline.set_screen((vwap < 0))
    def handle_data(context, data):
        pass
    def before_trading_start(context, data):
        context.results = pipeline_output('test')
        self.assertTrue(context.results.empty)
        count[0] += 1
    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.dates[0], end=current_day, env=self.env)
    algo.run(FakeDataPortal(self.env), overwrite_sim_params=False)
    self.assertTrue((count[0] > 0))
