-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding test for KSPDGBaseAgent logger
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ~~~ |