def test_print_report(self): stats = ht.events.stats.HoudiniEventStats(None) stats._last_run_time = 3.123456 stats._run_count = 2 stats._name = "name" stats.print_report()
def test_print_report(self, mock_logger): stats = ht.events.stats.HoudiniEventStats(None) stats._last_run_time = 3.123456 stats._run_count = 2 stats._name = "name" stats.print_report() self.assertEqual(mock_logger.info.call_count, 3)
def test_print_report(self, init_stats, mocker): mock_logger = mocker.patch("ht.events.stats._logger") stats = init_stats() stats._last_run_time = 3.123456 stats._run_count = 2 stats._name = "name" stats.print_report() assert mock_logger.info.call_count == 3
def test_print_report(self): item_stats = OrderedDict() item_stats["stat name"] = 123.456789 stats = ht.events.stats.HoudiniEventItemStats(None) stats._run_count = 2 stats._name = "name" stats._item_stats = item_stats stats._last_run_time = 456.12345678 stats.print_report()
def test_print_report(self, mock_logger): item_stats = OrderedDict() item_stats["stat name"] = 123.456789 stats = ht.events.stats.HoudiniEventItemStats(None) stats._run_count = 2 stats._name = "name" stats._item_stats = item_stats stats._last_run_time = 456.12345678 stats.print_report() self.assertEqual(mock_logger.info.call_count, 5)
def test_print_report(self, init_item_stats, mocker): mock_logger = mocker.patch("ht.events.stats._logger") item_stats = OrderedDict() item_stats["stat name"] = 123.456789 stats = init_item_stats() stats._run_count = 2 stats._name = "name" stats._item_stats = item_stats stats._last_run_time = 456.12345678 stats.print_report() assert mock_logger.info.call_count == 5