code: def test_ingest(self):
      calendar = get_calendar("XNYS")
      sessions = calendar.sessions_in_range(
          self.START_DATE, self.END_DATE
      )
      minutes = calendar.minutes_for_sessions_in_range(
          self.START_DATE,
          self.END_DATE,
      )
  
      sids = tuple(range(3))
      equities = make_simple_equity_info(
          sids,
          self.START_DATE,
          self.END_DATE,
      )
  
      daily_bar_data = make_bar_data(equities, sessions)
      minute_bar_data = make_bar_data(equities, minutes)
      first_split_ratio = 0.5
      second_split_ratio = 0.1
      splits = pd.DataFrame.from_records(
          [
              {
                  "effective_date": str_to_seconds("2014-01-08"),
                  "ratio": first_split_ratio,
                  "sid": 0,
              },
              {
                  "effective_date": str_to_seconds("2014-01-09"),
                  "ratio": second_split_ratio,
                  "sid": 1,
              },
          ]
      )
  
      @self.register(
          "bundle",
          calendar_name="NYSE",
          start_session=self.START_DATE,
          end_session=self.END_DATE,
      )
      def bundle_ingest(
          environ,
          asset_db_writer,
          minute_bar_writer,
          daily_bar_writer,
          adjustment_writer,
          calendar,
          start_session,
          end_session,
          cache,
          show_progress,
          output_dir,
      ):
          assert_is(environ, self.environ)
  
          asset_db_writer.write(equities=equities)
          minute_bar_writer.write(minute_bar_data)
          daily_bar_writer.write(daily_bar_data)
          adjustment_writer.write(splits=splits)
  
          assert_is_instance(calendar, TradingCalendar)
          assert_is_instance(cache, dataframe_cache)
          assert_is_instance(show_progress, bool)
  
      self.ingest("bundle", environ=self.environ)
      bundle = self.load("bundle", environ=self.environ)
  
      assert_equal(set(bundle.asset_finder.sids), set(sids))
  
      columns = "open", "high", "low", "close", "volume"
  
      actual = bundle.equity_minute_bar_reader.load_raw_arrays(
          columns,
          minutes[0],
          minutes[-1],
          sids,
      )
  
      for actual_column, colname in zip(actual, columns):
          assert_equal(
              actual_column,
              expected_bar_values_2d(minutes, sids, equities, colname),
              msg=colname,
          )
  
      actual = bundle.equity_daily_bar_reader.load_raw_arrays(
          columns,
          self.START_DATE,
          self.END_DATE,
          sids,
      )
      for actual_column, colname in zip(actual, columns):
          assert_equal(
              actual_column,
              expected_bar_values_2d(sessions, sids, equities, colname),
              msg=colname,
          )
      adjs_for_cols = bundle.adjustment_reader.load_pricing_adjustments(
          columns,
          sessions,
          pd.Index(sids),
      )
      for column, adjustments in zip(columns, adjs_for_cols[:-1]):
          # iterate over all the adjustments but `volume`
          assert_equal(
              adjustments,
              {
                  2: [
                      Float64Multiply(
                          first_row=0,
                          last_row=2,
                          first_col=0,
                          last_col=0,
                          value=first_split_ratio,
                      )
                  ],
                  3: [
                      Float64Multiply(
                          first_row=0,
                          last_row=3,
                          first_col=1,
                          last_col=1,
                          value=second_split_ratio,
                      )
                  ],
              },
              msg=column,
          )
  
      # check the volume, the value should be 1/ratio
      assert_equal(
          adjs_for_cols[-1],
          {
              2: [
                  Float64Multiply(
                      first_row=0,
                      last_row=2,
                      first_col=0,
                      last_col=0,
                      value=1 / first_split_ratio,
                  )
              ],
              3: [
                  Float64Multiply(
                      first_row=0,
                      last_row=3,
                      first_col=1,
                      last_col=1,
                      value=1 / second_split_ratio,
                  )
              ],
          },
          msg="volume",
      )
  
imports: import os
  from nose_parameterized import parameterized
  import pandas
  import sqlalchemy
  from toolz import valmap
  import toolz.curried.operator
  from trading_calendars import TradingCalendar, get_calendar
  from zipline.assets import ASSET_DB_VERSION
  from zipline.assets.asset_writer import check_version_info
  from zipline.assets.synthetic import make_simple_equity_info
  from zipline.data.bundles import UnknownBundle, from_bundle_ingest_dirname, ingestions_for_bundle
  from zipline.data.bundles.core import _make_bundle_core, BadClean, to_bundle_ingest_dirname, asset_db_path
  from zipline.lib.adjustment import Float64Multiply
  from zipline.pipeline.loaders.synthetic import make_bar_data, expected_bar_values_2d
  from zipline.testing import subtest, str_to_seconds
  from zipline.testing.fixtures import WithInstanceTmpDir, ZiplineTestCase, WithDefaultDateBounds
  from zipline.testing.predicates import assert_equal, assert_false, assert_in, assert_is, assert_is_instance, assert_is_none, assert_raises, assert_true
  from zipline.utils.cache import dataframe_cache
  from zipline.utils.functional import apply
  import zipline.utils.paths
label_desc: Use image node_id 6 for calling the BundleCoreTestCase obj's underlying member method code with example usage: obj.test_ingest() without return types