code: def test_dailyWithEvents_bugs(self):
      # Reproduce issue #521
      tkr1 = "QQQ"
      tkr2 = "GDX"
      start_d = "2014-12-29"
      end_d = "2020-11-29"
      df1 = yf.Ticker(tkr1).history(
          start=start_d, end=end_d, interval="1d", actions=True
      )
      df2 = yf.Ticker(tkr2).history(
          start=start_d, end=end_d, interval="1d", actions=True
      )
      self.assertTrue(
          ((df1["Dividends"] > 0) | (df1["Stock Splits"] > 0)).any()
      )
      self.assertTrue(
          ((df2["Dividends"] > 0) | (df2["Stock Splits"] > 0)).any()
      )
      try:
          self.assertTrue(df1.index.equals(df2.index))
      except AssertionError:
          missing_from_df1 = df2.index.difference(df1.index)
          missing_from_df2 = df1.index.difference(df2.index)
          print(
              "{} missing these dates: {}".format(
                  tkr1, missing_from_df1
              )
          )
          print(
              "{} missing these dates: {}".format(
                  tkr2, missing_from_df2
              )
          )
          raise
  
      # Test that index same with and without events:
      tkrs = [tkr1, tkr2]
      for tkr in tkrs:
          df1 = yf.Ticker(tkr, session=self.session).history(
              start=start_d, end=end_d, interval="1d", actions=True
          )
          df2 = yf.Ticker(tkr, session=self.session).history(
              start=start_d, end=end_d, interval="1d", actions=False
          )
          self.assertTrue(
              ((df1["Dividends"] > 0) | (df1["Stock Splits"] > 0)).any()
          )
          try:
              self.assertTrue(df1.index.equals(df2.index))
          except AssertionError:
              missing_from_df1 = df2.index.difference(df1.index)
              missing_from_df2 = df1.index.difference(df2.index)
              print(
                  "{}-with-events missing these dates: {}".format(
                      tkr, missing_from_df1
                  )
              )
              print(
                  "{}-without-events missing these dates: {}".format(
                      tkr, missing_from_df2
                  )
              )
              raise
  
      # Reproduce issue #1634 - 1d dividend out-of-range, should be prepended to prices
      div_dt = _pd.Timestamp(2022, 7, 21).tz_localize(
          "America/New_York"
      )
      df_dividends = _pd.DataFrame(
          data={"Dividends": [1.0]}, index=[div_dt]
      )
      df_prices = _pd.DataFrame(
          data={c: [1.0] for c in yf.const.price_colnames}
          | {"Volume": 0},
          index=[div_dt + _dt.timedelta(days=1)],
      )
      df_merged = yf.utils.safe_merge_dfs(df_prices, df_dividends, "1d")
      self.assertEqual(df_merged.shape[0], 2)
      self.assertTrue(
          df_merged[df_prices.columns].iloc[1:].equals(df_prices)
      )
      self.assertEqual(df_merged.index[0], div_dt)
  
imports: from .context import yfinance
  from .context import session_gbl
  import unittest
  import os
  import datetime
  import pytz
  import numpy
  import pandas
label_desc: Use image node_id 14 for calling the TestPriceHistory obj's underlying member method code with example usage: obj.test_dailyWithEvents_bugs() without return types