Repository: AlgoETS/BullETS (language: python)

Issue:
Make better prints when testing
Our current tests print stuff out like it's a normal strategy, this should not be the case, we should know just by looking at the prints/logs what test passed and failed.


Discussion / hints:

Fix patch:
diff --git a/src/bullets/logger.py b/src/bullets/logger.py
index 3a82ec4..3704533 100644
--- a/src/bullets/logger.py
+++ b/src/bullets/logger.py
@@ -68,16 +68,36 @@ def set_log_level(level: str):
 
 
 def error(message: str):
+    """
+    Log an error message
+    Args:
+        message: The message that will be logged
+    """
     LOGGER.error(message)
 
 
 def warning(message: str):
+    """
+    Log a warning message
+    Args:
+        message: The message that will be logged
+    """
     LOGGER.warning(message)
 
 
 def info(message: str):
+    """
+    Log an info message
+    Args:
+        message: The message that will be logged
+    """
     LOGGER.info(message)
 
 
 def debug(message: str):
+    """
+    Log a debug message
+    Args:
+        message: The message that will be logged
+    """
     LOGGER.debug(message)


Test patch:
diff --git a/src/test/test_portfolio.py b/src/test/test_portfolio.py
index ec42bf8..919c91f 100644
--- a/src/test/test_portfolio.py
+++ b/src/test/test_portfolio.py
@@ -2,6 +2,8 @@
 import unittest
 import datetime
 from unittest import mock
+
+from bullets import logger
 from bullets.portfolio.portfolio import Portfolio
 from bullets.portfolio.transaction import Transaction, Status
 from bullets.data_source.data_source_interface import DataSourceInterface, Resolution
@@ -14,107 +16,147 @@ class TestPortfolio(unittest.TestCase):
     @mock.patch('bullets.data_source.data_source_interface.DataSourceInterface.get_price', return_value=1)
     @mock.patch('bullets.portfolio.portfolio.Portfolio._get_slippage_price', return_value=1)
     def test_buy_sell_long(self, mock_get_price, mock__get_slippage_price):
-        portfolio = Portfolio(1000, DataSourceInterface(), 25, 1)
-        transaction = portfolio.market_order("AAPL", 999)
-        self.assertEqual(Status.SUCCESSFUL, transaction.status)
-        self.assertEqual(0, portfolio.cash_balance)
-        transaction = portfolio.market_order("AAPL", -999)
-        self.assertEqual(Status.SUCCESSFUL, transaction.status)
-        self.assertEqual(998, portfolio.cash_balance)
-        self.assertEqual(0, len(portfolio.holdings))
-        self.assertEqual(2, len(portfolio.transactions))
+        try:
+            logger.set_log_level("WARNING")
+            portfolio = Portfolio(1000, DataSourceInterface(), 25, 1)
+            transaction = portfolio.market_order("AAPL", 999)
+            self.assertEqual(Status.SUCCESSFUL, transaction.status)
+            self.assertEqual(0, portfolio.cash_balance)
+            transaction = portfolio.market_order("AAPL", -999)
+            self.assertEqual(Status.SUCCESSFUL, transaction.status)
+            self.assertEqual(998, portfolio.cash_balance)
+            self.assertEqual(0, len(portfolio.holdings))
+            self.assertEqual(2, len(portfolio.transactions))
+            logger.set_log_level("INFO")
+            logger.info("Portfolio buy sell long test successful")
+        finally:
+            pass
 
     @mock.patch('bullets.data_source.data_source_interface.DataSourceInterface.get_price', return_value=1)
     @mock.patch('bullets.portfolio.portfolio.Portfolio._get_slippage_price', return_value=1)
     def test_buy_sell_short(self, mock_get_price, mock__get_slippage_price):
-        portfolio = Portfolio(1000, DataSourceInterface(), 25, 1)
-        transaction = portfolio.market_order("AAPL", -1000)
-        self.assertEqual(Status.SUCCESSFUL, transaction.status)
-        self.assertEqual(1999, portfolio.cash_balance)
-        transaction = portfolio.market_order("AAPL", 1000)
-        self.assertEqual(Status.SUCCESSFUL, transaction.status)
-        self.assertEqual(0, len(portfolio.holdings))
-        self.assertEqual(2, len(portfolio.transactions))
+        try:
+            logger.set_log_level("WARNING")
+            portfolio = Portfolio(1000, DataSourceInterface(), 25, 1)
+            transaction = portfolio.market_order("AAPL", -1000)
+            self.assertEqual(Status.SUCCESSFUL, transaction.status)
+            self.assertEqual(1999, portfolio.cash_balance)
+            transaction = portfolio.market_order("AAPL", 1000)
+            self.assertEqual(Status.SUCCESSFUL, transaction.status)
+            self.assertEqual(0, len(portfolio.holdings))
+            self.assertEqual(2, len(portfolio.transactions))
+            logger.set_log_level("INFO")
+            logger.info("Portfolio buy sell short test successful")
+        finally:
+            pass
 
     @mock.patch('bullets.data_source.data_source_interface.DataSourceInterface.get_price', return_value=1)
     @mock.patch('bullets.portfolio.portfolio.Portfolio._get_slippage_price', return_value=1)
     def test_insufficient_funds(self, mock_get_price, mock__get_slippage_price):
-        portfolio = Portfolio(1000, DataSourceInterface(), 25, 1)
-        transaction = portfolio.market_order("AAPL", 2000)
-        self.assertEqual(Status.FAILED_INSUFFICIENT_FUNDS, transaction.status)
-        self.assertEqual(1000, portfolio.cash_balance)
-        self.assertEqual(0, len(portfolio.holdings))
-        self.assertEqual(1, len(portfolio.transactions))
+        try:
+            logger.set_log_level("WARNING")
+            portfolio = Portfolio(1000, DataSourceInterface(), 25, 1)
+            transaction = portfolio.market_order("AAPL", 2000)
+            self.assertEqual(Status.FAILED_INSUFFICIENT_FUNDS, transaction.status)
+            self.assertEqual(1000, portfolio.cash_balance)
+            self.assertEqual(0, len(portfolio.holdings))
+            self.assertEqual(1, len(portfolio.transactions))
+            logger.set_log_level("INFO")
+            logger.info("Portfolio insufficient funds test successful")
+        finally:
+            pass
 
     def test_market_order(self):
-        data_source = FmpDataSource(os.getenv("FMP_TOKEN"), Resolution.MINUTE)
-        portfolio = Portfolio(1000, data_source, 25, 1)
-        portfolio.timestamp = datetime.datetime(2019, 3, 12, 15, 57)
-        data_source.timestamp = datetime.datetime(2019, 3, 12, 15, 57)
-        portfolio.market_order('AAPL', 5)
-        data_source.timestamp = datetime.datetime(2019, 3, 13, 15, 57)
-        portfolio.timestamp = datetime.datetime(2019, 3, 13, 15, 57)
-        self.assertEqual(1003.8499999999999, portfolio.update_and_get_balance())
+        try:
+            logger.set_log_level("WARNING")
+            data_source = FmpDataSource(os.getenv("FMP_TOKEN"), Resolution.MINUTE)
+            portfolio = Portfolio(1000, data_source, 25, 1)
+            portfolio.timestamp = datetime.datetime(2019, 3, 12, 15, 57)
+            data_source.timestamp = datetime.datetime(2019, 3, 12, 15, 57)
+            portfolio.market_order('AAPL', 5)
+            data_source.timestamp = datetime.datetime(2019, 3, 13, 15, 57)
+            portfolio.timestamp = datetime.datetime(2019, 3, 13, 15, 57)
+            self.assertEqual(1003.8499999999999, portfolio.update_and_get_balance())
+            logger.set_log_level("INFO")
+            logger.info("Portfolio market order test successful")
+        finally:
+            pass
 
     def test_buy_stop_order(self):
-        data_source = FmpDataSource(os.getenv("FMP_TOKEN"), Resolution.MINUTE)
-        portfolio = Portfolio(1000, data_source, 25, 1)
-        data_source.timestamp = datetime.datetime(2021, 4, 14, 15, 57)
-        portfolio.timestamp = datetime.datetime(2021, 4, 14, 15, 57)
-        portfolio.buy_stop_order("AAPL", 5, 131)
-        portfolio.on_resolution()
-        price = data_source.get_price('AAPL')
-        self.assertEqual(1000, portfolio.update_and_get_balance())
-        data_source.timestamp = datetime.datetime(2021, 6, 14, 15, 57)
-        portfolio.timestamp = datetime.datetime(2021, 6, 14, 15, 57)
-        portfolio.on_resolution()
-        price = data_source.get_price('AAPL')
-        self.assertEqual(999.0, portfolio.update_and_get_balance())
+        try:
+            logger.set_log_level("WARNING")
+            data_source = FmpDataSource(os.getenv("FMP_TOKEN"), Resolution.MINUTE)
+            portfolio = Portfolio(1000, data_source, 25, 1)
+            data_source.timestamp = datetime.datetime(2021, 4, 14, 15, 57)
+            portfolio.timestamp = datetime.datetime(2021, 4, 14, 15, 57)
+            portfolio.buy_stop_order("AAPL", 5, 131)
+            portfolio.on_resolution()
+            self.assertEqual(1000, portfolio.update_and_get_balance())
+            data_source.timestamp = datetime.datetime(2021, 6, 14, 15, 57)
+            portfolio.timestamp = datetime.datetime(2021, 6, 14, 15, 57)
+            portfolio.on_resolution()
+            self.assertEqual(999.0, portfolio.update_and_get_balance())
+            logger.set_log_level("INFO")
+            logger.info("Portfolio buy stop order test successful")
+        finally:
+            pass
 
     def test_sell_stop_order(self):
-        data_source = FmpDataSource(os.getenv("FMP_TOKEN"), Resolution.MINUTE)
-        portfolio = Portfolio(1000, data_source, 25, 1)
-        data_source.timestamp = datetime.datetime(2021, 6, 14, 15, 57)
-        portfolio.timestamp = datetime.datetime(2021, 6, 14, 15, 57)
-        portfolio.sell_stop_order("AAPL", 5, 131)
-        portfolio.on_resolution()
-        price = data_source.get_price('AAPL')
-        self.assertEqual(1000, portfolio.update_and_get_balance())
-        data_source.timestamp = datetime.datetime(2021, 4, 14, 15, 57)
-        portfolio.timestamp = datetime.datetime(2021, 4, 14, 15, 57)
-        portfolio.on_resolution()
-        price = data_source.get_price('AAPL')
-        self.assertEqual(999.0000000000001, portfolio.update_and_get_balance())
+        try:
+            logger.set_log_level("WARNING")
+            data_source = FmpDataSource(os.getenv("FMP_TOKEN"), Resolution.MINUTE)
+            portfolio = Portfolio(1000, data_source, 25, 1)
+            data_source.timestamp = datetime.datetime(2021, 6, 14, 15, 57)
+            portfolio.timestamp = datetime.datetime(2021, 6, 14, 15, 57)
+            portfolio.sell_stop_order("AAPL", 5, 131)
+            portfolio.on_resolution()
+            self.assertEqual(1000, portfolio.update_and_get_balance())
+            data_source.timestamp = datetime.datetime(2021, 4, 14, 15, 57)
+            portfolio.timestamp = datetime.datetime(2021, 4, 14, 15, 57)
+            portfolio.on_resolution()
+            self.assertEqual(999.0000000000001, portfolio.update_and_get_balance())
+            logger.set_log_level("INFO")
+            logger.info("Portfolio sell stop order test successful")
+        finally:
+            pass
 
     def test_buy_limit_order(self):
-        data_source = FmpDataSource(os.getenv("FMP_TOKEN"), Resolution.MINUTE)
-        portfolio = Portfolio(1000, data_source, 25, 1)
-        data_source.timestamp = datetime.datetime(2021, 4, 14, 15, 57)
-        portfolio.timestamp = datetime.datetime(2021, 4, 14, 15, 57)
-        portfolio.buy_limit_order("AAPL", 5, 131)
-        portfolio.on_resolution()
-        price = data_source.get_price('AAPL')
-        self.assertEqual(1000, portfolio.update_and_get_balance())
-        data_source.timestamp = datetime.datetime(2021, 6, 14, 15, 57)
-        portfolio.timestamp = datetime.datetime(2021, 6, 14, 15, 57)
-        portfolio.on_resolution()
-        price = data_source.get_price('AAPL')
-        self.assertEqual(999.0, portfolio.update_and_get_balance())
+        try:
+            logger.set_log_level("WARNING")
+            data_source = FmpDataSource(os.getenv("FMP_TOKEN"), Resolution.MINUTE)
+            portfolio = Portfolio(1000, data_source, 25, 1)
+            data_source.timestamp = datetime.datetime(2021, 4, 14, 15, 57)
+            portfolio.timestamp = datetime.datetime(2021, 4, 14, 15, 57)
+            portfolio.buy_limit_order("AAPL", 5, 131)
+            portfolio.on_resolution()
+            self.assertEqual(1000, portfolio.update_and_get_balance())
+            data_source.timestamp = datetime.datetime(2021, 6, 14, 15, 57)
+            portfolio.timestamp = datetime.datetime(2021, 6, 14, 15, 57)
+            portfolio.on_resolution()
+            self.assertEqual(999.0, portfolio.update_and_get_balance())
+            logger.set_log_level("INFO")
+            logger.info("Portfolio buy limit order test successful")
+        finally:
+            pass
 
     def test_sell_limit_order(self):
-        data_source = FmpDataSource(os.getenv("FMP_TOKEN"), Resolution.MINUTE)
-        portfolio = Portfolio(1000, data_source, 25, 1)
-        data_source.timestamp = datetime.datetime(2021, 6, 14, 15, 57)
-        portfolio.timestamp = datetime.datetime(2021, 6, 14, 15, 57)
-        portfolio.sell_limit_order("AAPL", 5, 131)
-        portfolio.on_resolution()
-        price = data_source.get_price('AAPL')
-        self.assertEqual(1000, portfolio.update_and_get_balance())
-        data_source.timestamp = datetime.datetime(2021, 4, 14, 15, 57)
-        portfolio.timestamp = datetime.datetime(2021, 4, 14, 15, 57)
-        portfolio.on_resolution()
-        price = data_source.get_price('AAPL')
-        self.assertEqual(999.0000000000001, portfolio.update_and_get_balance())
+        try:
+            logger.set_log_level("WARNING")
+            data_source = FmpDataSource(os.getenv("FMP_TOKEN"), Resolution.MINUTE)
+            portfolio = Portfolio(1000, data_source, 25, 1)
+            data_source.timestamp = datetime.datetime(2021, 6, 14, 15, 57)
+            portfolio.timestamp = datetime.datetime(2021, 6, 14, 15, 57)
+            portfolio.sell_limit_order("AAPL", 5, 131)
+            portfolio.on_resolution()
+            self.assertEqual(1000, portfolio.update_and_get_balance())
+            data_source.timestamp = datetime.datetime(2021, 4, 14, 15, 57)
+            portfolio.timestamp = datetime.datetime(2021, 4, 14, 15, 57)
+            portfolio.on_resolution()
+            self.assertEqual(999.0000000000001, portfolio.update_and_get_balance())
+            logger.set_log_level("INFO")
+            logger.info("Portfolio sell limit order test successful")
+        finally:
+            pass
 
 
 if __name__ == '__main__':
diff --git a/src/test/test_strategy.py b/src/test/test_strategy.py
index 12e2a00..52afacb 100644
--- a/src/test/test_strategy.py
+++ b/src/test/test_strategy.py
@@ -1,96 +1,174 @@
 import os
 import unittest
 
+from bullets import logger
 from bullets.strategy import Strategy, Resolution
 from bullets.runner import Runner
 from bullets.data_source.data_source_fmp import FmpDataSource
 from datetime import datetime, date
 
 
-class TestPortfolio(unittest.TestCase):
+class ActualStrategy(Strategy):
+    def on_start(self):
+        pass
+
+    def on_resolution(self):
+        self.portfolio.market_order("AAPL", 5)
+
+    def on_finish(self):
+        pass
+
+
+class TestStrategy(unittest.TestCase):
     RESOLUTION = Resolution.DAILY
     START_TIME = datetime(2019, 3, 5)
     END_TIME = datetime(2019, 4, 22)
     STARTING_BALANCE = 5000
     FMP_TOKEN = os.getenv("FMP_TOKEN")
-
-    def test_strategy(self):
-        strategy = TestStrategy(resolution=self.RESOLUTION,
-                                start_time=self.START_TIME,
-                                end_time=self.END_TIME,
-                                starting_balance=self.STARTING_BALANCE,
-                                data_source=FmpDataSource(self.FMP_TOKEN, self.RESOLUTION))
-        runner = Runner(strategy)
-        runner.start()
-        self.assertEqual(5000, strategy.portfolio.start_balance)
-        self.assertEqual(5458.0374725, strategy.portfolio.update_and_get_balance())
-        self.assertEqual(89.12497250000004, strategy.portfolio.cash_balance)
-        self.assertEqual(9.16, strategy.portfolio.get_percentage_profit())
-        self.assertEqual(33, len(strategy.portfolio.transactions))
+    strategy = ActualStrategy(resolution=RESOLUTION,
+                              start_time=START_TIME,
+                              end_time=END_TIME,
+                              starting_balance=STARTING_BALANCE,
+                              data_source=FmpDataSource(FMP_TOKEN, RESOLUTION))
+    logger.set_log_level("WARNING")
+    runner = Runner(strategy)
+    runner.start()
+    logger.set_log_level("INFO")
+
+    def test_strategy_start_balance(self):
+        try:
+            self.assertEqual(5000, self.strategy.portfolio.start_balance)
+            logger.info("Strategy start balance test successful")
+        finally:
+            pass
+
+    def test_strategy_final_investment_balance(self):
+        try:
+            self.assertEqual(5458.0374725, self.strategy.portfolio.update_and_get_balance())
+            logger.info("Strategy final investment balance test successful")
+        finally:
+            pass
+
+    def test_strategy_final_cash_balance(self):
+        try:
+            self.assertEqual(89.12497250000004, self.strategy.portfolio.cash_balance)
+            logger.info("Strategy final cash balance test successful")
+        finally:
+            pass
+
+    def test_strategy_final_percentage_profit(self):
+        try:
+            self.assertEqual(9.16, self.strategy.portfolio.get_percentage_profit())
+            logger.info("Strategy final percentage profit test successful")
+        finally:
+            pass
+
+    def test_strategy_final_transaction_count(self):
+        try:
+            self.assertEqual(33, len(self.strategy.portfolio.transactions))
+            logger.info("Strategy final transaction count test successful")
+        finally:
+            pass
 
     def test_strategy_none_date(self):
-        self.assertRaisesRegex(TypeError, "Invalid strategy date type", TestStrategy,
-                               self.RESOLUTION, None, None, self.STARTING_BALANCE,
-                               FmpDataSource(self.FMP_TOKEN, self.RESOLUTION))
+        try:
+            self.assertRaisesRegex(TypeError, "Invalid strategy date type", ActualStrategy,
+                                   self.RESOLUTION, None, None, self.STARTING_BALANCE,
+                                   FmpDataSource(self.FMP_TOKEN, self.RESOLUTION))
+            logger.info("Invalid strategy date type test successful")
+        finally:
+            pass
 
     def test_strategy_invalid_date(self):
-        self.assertRaisesRegex(ValueError, "Strategy start time has to be before end time", TestStrategy,
-                               self.RESOLUTION, self.END_TIME, self.START_TIME, self.STARTING_BALANCE,
-                               FmpDataSource(self.FMP_TOKEN, self.RESOLUTION))
+        try:
+            self.assertRaisesRegex(ValueError, "Strategy start time has to be before end time", ActualStrategy,
+                                   self.RESOLUTION, self.END_TIME, self.START_TIME, self.STARTING_BALANCE,
+                                   FmpDataSource(self.FMP_TOKEN, self.RESOLUTION))
+            logger.info("Invalid strategy start time & end time test successful")
+        finally:
+            pass
 
     def test_strategy_none_resolution(self):
-        self.assertRaisesRegex(TypeError, "Invalid strategy resolution type", TestStrategy,
-                               None, self.START_TIME, self.END_TIME, self.STARTING_BALANCE,
-                               FmpDataSource(self.FMP_TOKEN, self.RESOLUTION))
+        try:
+            self.assertRaisesRegex(TypeError, "Invalid strategy resolution type", ActualStrategy,
+                                   None, self.START_TIME, self.END_TIME, self.STARTING_BALANCE,
+                                   FmpDataSource(self.FMP_TOKEN, self.RESOLUTION))
+            logger.info("Invalid strategy resolution type test successful")
+        finally:
+            pass
 
     def test_strategy_none_data_source(self):
-        self.assertRaisesRegex(TypeError, "Invalid strategy data source type", TestStrategy,
-                               self.RESOLUTION, self.START_TIME, self.END_TIME, self.STARTING_BALANCE, None)
+        try:
+            self.assertRaisesRegex(TypeError, "Invalid strategy data source type", ActualStrategy,
+                                   self.RESOLUTION, self.START_TIME, self.END_TIME, self.STARTING_BALANCE, None)
+            logger.info("Invalid strategy data source test successful")
+        finally:
+            pass
 
     def test_strategy_invalid_balance(self):
-        self.assertRaisesRegex(ValueError, "Strategy starting balance should be positive", TestStrategy,
-                               self.RESOLUTION, self.START_TIME, self.END_TIME, self.STARTING_BALANCE * -1,
-                               FmpDataSource(self.FMP_TOKEN, self.RESOLUTION))
+        try:
+            self.assertRaisesRegex(ValueError, "Strategy starting balance should be positive", ActualStrategy,
+                                   self.RESOLUTION, self.START_TIME, self.END_TIME, self.STARTING_BALANCE * -1,
+                                   FmpDataSource(self.FMP_TOKEN, self.RESOLUTION))
+            logger.info("Invalid strategy balance test successful")
+        finally:
+            pass
+
+    def test_income_statement(self):
+        try:
+            datasource = FmpDataSource(self.FMP_TOKEN, self.RESOLUTION)
+            self.assertEqual(2.9925, datasource.get_income_statement("AAPL", date(2019, 9, 28)).eps)
+            logger.info("Income statement test successful")
+        finally:
+            pass
 
-    def test_income_statements(self):
-        datasource = FmpDataSource(self.FMP_TOKEN, self.RESOLUTION)
-        self.assertEqual(2.9925, datasource.get_income_statement("AAPL", date(2019, 9, 28)).eps)
+    def test_income_statement_list(self):
+        try:
+            datasource = FmpDataSource(self.FMP_TOKEN, self.RESOLUTION)
+            self.assertEqual(True, 'AAPL' in datasource.get_income_statement_list())
+            logger.info("Income statement list test successful")
+        finally:
+            pass
 
     def test_balance_sheet_statements(self):
-        datasource = FmpDataSource(self.FMP_TOKEN, self.RESOLUTION)
-        self.assertEqual(4106000000, datasource.get_balance_sheet_statement("AAPL", date(2019, 9, 28)).inventory)
+        try:
+            datasource = FmpDataSource(self.FMP_TOKEN, self.RESOLUTION)
+            self.assertEqual(4106000000, datasource.get_balance_sheet_statement("AAPL", date(2019, 9, 28)).inventory)
+            logger.info("Balance sheet statements test successful")
+        finally:
+            pass
 
     def test_cash_flow_statements(self):
-        datasource = FmpDataSource(self.FMP_TOKEN, self.RESOLUTION)
-        self.assertEqual(55256000000, datasource.get_cash_flow_statement("AAPL", date(2019, 9, 28)).net_income)
+        try:
+            datasource = FmpDataSource(self.FMP_TOKEN, self.RESOLUTION)
+            self.assertEqual(55256000000, datasource.get_cash_flow_statement("AAPL", date(2019, 9, 28)).net_income)
+            logger.info("Cash flow statements test successful")
+        finally:
+            pass
 
     def test_symbol_list(self):
-        datasource = FmpDataSource(self.FMP_TOKEN, self.RESOLUTION)
-        self.assertEqual(True, any(item['symbol'] == 'AAPL' for item in datasource.get_symbol_list()))
+        try:
+            datasource = FmpDataSource(self.FMP_TOKEN, self.RESOLUTION)
+            self.assertEqual(True, any(item['symbol'] == 'AAPL' for item in datasource.get_symbol_list()))
+            logger.info("Symbol list test successful")
+        finally:
+            pass
 
     def test_forex_currency_pairs_list(self):
-        datasource = FmpDataSource(self.FMP_TOKEN, self.RESOLUTION)
-        self.assertEqual(True, any(item['symbol'] == 'JPYUSD' for item in datasource.get_forex_currency_pairs_list()))
-
-    def test_income_statement_list(self):
-        datasource = FmpDataSource(self.FMP_TOKEN, self.RESOLUTION)
-        self.assertEqual(True, 'AAPL' in datasource.get_income_statement_list())
+        try:
+            datasource = FmpDataSource(self.FMP_TOKEN, self.RESOLUTION)
+            self.assertEqual(True, any(item['symbol'] == 'JPYUSD' for item in datasource.get_forex_currency_pairs_list()))
+            logger.info("Forex currency pairs list test successful")
+        finally:
+            pass
 
     def test_tradable_symbol_list(self):
-        datasource = FmpDataSource(self.FMP_TOKEN, self.RESOLUTION)
-        self.assertEqual(True, any(item['symbol'] == 'AAPL' for item in datasource.get_tradable_symbol_list()))
-
-
-class TestStrategy(Strategy):
-
-    def on_start(self):
-        pass
-
-    def on_resolution(self):
-        self.portfolio.market_order("AAPL", 5)
-
-    def on_finish(self):
-        pass
+        try:
+            datasource = FmpDataSource(self.FMP_TOKEN, self.RESOLUTION)
+            self.assertEqual(True, any(item['symbol'] == 'AAPL' for item in datasource.get_tradable_symbol_list()))
+            logger.info("Tradable symbol list test successful")
+        finally:
+            pass
 
 
 if __name__ == '__main__':
diff --git a/src/test/test_us_holiday.py b/src/test/test_us_holiday.py
index 62fc4da..fe23d13 100644
--- a/src/test/test_us_holiday.py
+++ b/src/test/test_us_holiday.py
@@ -1,6 +1,7 @@
 import unittest
 from datetime import datetime
 
+from bullets import logger
 from bullets.utils.holiday_date_util import us_holiday_list
 
 
@@ -10,40 +11,76 @@ class TestUsHoliday(unittest.TestCase):
     """
 
     def test_martin_luther_king_day(self):
-        date = datetime(2023, 1, 16)
-        self.assertEqual(True, date in us_holiday_list(date.year))
+        try:
+            date = datetime(2023, 1, 16)
+            self.assertEqual(True, date in us_holiday_list(date.year))
+            logger.info("Martin Luther King day test successful")
+        finally:
+            pass
 
     def test_washingtons_birthday(self):
-        date = datetime(2023, 2, 20)
-        self.assertEqual(True, date in us_holiday_list(date.year))
+        try:
+            date = datetime(2023, 2, 20)
+            self.assertEqual(True, date in us_holiday_list(date.year))
+            logger.info("Washingtons birthday test successful")
+        finally:
+            pass
+
+    def test_good_friday(self):
+        try:
+            date = datetime(2023, 4, 7)
+            self.assertEqual(True, date in us_holiday_list(date.year))
+            logger.info("Good friday test successful")
+        finally:
+            pass
 
     def test_memorial_day(self):
-        date = datetime(2023, 5, 29)
-        self.assertEqual(True, date in us_holiday_list(date.year))
+        try:
+            date = datetime(2023, 5, 29)
+            self.assertEqual(True, date in us_holiday_list(date.year))
+            logger.info("Memorial day test successful")
+        finally:
+            pass
 
     def test_juneteenth_national_independence_day(self):
-        date = datetime(2023, 6, 19)
-        self.assertEqual(True, date in us_holiday_list(date.year))
+        try:
+            date = datetime(2023, 6, 19)
+            self.assertEqual(True, date in us_holiday_list(date.year))
+            logger.info("Juneteenth national independence day test successful")
+        finally:
+            pass
 
     def test_independence_day(self):
-        date = datetime(2023, 7, 4)
-        self.assertEqual(True, date in us_holiday_list(date.year))
+        try:
+            date = datetime(2023, 7, 4)
+            self.assertEqual(True, date in us_holiday_list(date.year))
+            logger.info("Independence day test successful")
+        finally:
+            pass
 
     def test_labor_day(self):
-        date = datetime(2023, 9, 4)
-        self.assertEqual(True, date in us_holiday_list(date.year))
+        try:
+            date = datetime(2023, 9, 4)
+            self.assertEqual(True, date in us_holiday_list(date.year))
+            logger.info("Labor day test successful")
+        finally:
+            pass
 
     def test_thanksgiving_day(self):
-        date = datetime(2023, 11, 23)
-        self.assertEqual(True, date in us_holiday_list(date.year))
+        try:
+            date = datetime(2023, 11, 23)
+            self.assertEqual(True, date in us_holiday_list(date.year))
+            logger.info("Thanksgiving day test successful")
+        finally:
+            pass
 
     def test_christmas_day(self):
-        date = datetime(2023, 12, 25)
-        self.assertEqual(True, date in us_holiday_list(date.year))
-
-    def test_good_friday(self):
-        date = datetime(2023, 4, 7)
-        self.assertEqual(True, date in us_holiday_list(date.year))
+        try:
+            date = datetime(2023, 12, 25)
+            self.assertEqual(True, date in us_holiday_list(date.year))
+            logger.info("Christmas day test successful")
+        finally:
+            pass
 
 
 if __name__ == '__main__':