code: def test_Stock():
      d = d_pass[0]
      pf = build_portfolio(**d)
      # loop over all stocks stored within pf and check that values
      # are equal to the ones in pf
      for i in range(len(pf.stocks)):
          assert isinstance(pf.get_stock(names[0]), Stock)
          stock = pf.get_stock(names[i])
          assert stock.name == pf.portfolio["Name"][i]
          assert all(
              stock.data - pf.data[stock.name].to_frame() <= strong_abse
          )
          assert all(
              stock.investmentinfo
              == pf.portfolio.loc[pf.portfolio["Name"] == stock.name]
          )
  
file_path: FinQuant/tests/test_stock.py
imports: import datetime
  import os
  import pathlib
  import numpy
  import pandas
  import pytest
  import quandl
  import yfinance
  from finquant.portfolio import build_portfolio
  from finquant.stock import Stock
label_desc: Use image node_id 1 for calling a global function with example usage: test_Stock() without return types