Skip to content

Commit

Permalink
adding test for KSPDGBaseAgent logger
Browse files Browse the repository at this point in the history
  • Loading branch information
rallen10 committed Jul 1, 2024
1 parent b80da18 commit d5555e6
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/serverless_tests/test_serverless_base_agent.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (c) 2024, MASSACHUSETTS INSTITUTE OF TECHNOLOGY
# Subject to FAR 52.227-11 – Patent Rights – Ownership by the Contractor (May 2014).
# SPDX-License-Identifier: MIT

from kspdg.agent_api.base_agent import KSPDGBaseAgent

class FooAgent(KSPDGBaseAgent):
def __init__(self, debug: bool = False):
# super().__init__(logger_name=FooAgent.__name__, debug=debug)
super().__init__(debug=debug)
def get_action(self, observation):
return None

def test_KSPDGBaseAgent_logger_0():
"""check logger is created and set to debug without error"""

# ~~ ARRANGE ~~

foo_agent = FooAgent(debug=True)

# ~~ ACT ~~
foo_agent.logger.warning("this is a warning statement")
foo_agent.logger.info("this is an info statement")
foo_agent.logger.debug("this is a debug statement")

# ~~ ASSERT ~~~

0 comments on commit d5555e6

Please sign in to comment.