def test_view(mocker): # MOCK VISUALIZE_OUTPUT mocker.patch( target="gamestonk_terminal.helper_classes.TerminalStyle.visualize_output" ) finviz_view.view(ticker="PM")
def call_view(self, other_args: List[str]): """Process view command""" parser = argparse.ArgumentParser( add_help=False, formatter_class=argparse.ArgumentDefaultsHelpFormatter, prog="view", description="""View historical price with trendlines. [Source: Finviz]""", ) ns_parser = parse_known_args_and_warn( parser, other_args, EXPORT_ONLY_FIGURES_ALLOWED ) if ns_parser: finviz_view.view(self.ticker)
def test_view(mocker): # MOCK CHARTS mocker.patch.object(target=finviz_view.gtff, attribute="USE_ION", new=True) mocker.patch( target= "gamestonk_terminal.stocks.technical_analysis.finviz_view.plt.ion") mocker.patch( target= "gamestonk_terminal.stocks.technical_analysis.finviz_view.plt.imshow") mocker.patch( target= "gamestonk_terminal.stocks.technical_analysis.finviz_view.plt.show") finviz_view.view(ticker="PM") finviz_view.plt.ion.assert_called_once() finviz_view.plt.imshow.assert_called_once() finviz_view.plt.show.assert_called_once()
def call_view(self, other_args: List[str]): """Process view command""" parser = argparse.ArgumentParser( add_help=False, formatter_class=argparse.ArgumentDefaultsHelpFormatter, prog="view", description= """View historical price with trendlines. [Source: Finviz]""", ) try: ns_parser = parse_known_args_and_warn(parser, other_args) if not ns_parser: return finviz_view.view(self.ticker) except Exception as e: print(e, "\n")