Skip to content

Commit

Permalink
improved tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jgstew committed Aug 30, 2024
1 parent 058cb25 commit 60e6520
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,19 @@ class RequestResult(object):
# test plugin_utilities:
print(besapi.plugin_utilities.get_invoke_folder())
print(besapi.plugin_utilities.get_invoke_file_name())
# the following doesn't seem to work in python 3.7:
logging_config = besapi.plugin_utilities.get_plugin_logging_config()

parser = besapi.plugin_utilities.setup_plugin_argparse(plugin_args_required=False)
# allow unknown args to be parsed instead of throwing an error:
args, _unknown = parser.parse_known_args()

# test logging plugin_utilities:
import logging

logging_config = besapi.plugin_utilities.get_plugin_logging_config("./tests.log")
logging.basicConfig(**logging_config)

logging.warning("Just testing to see if logging is working!")

assert os.path.isfile("./tests.log")

sys.exit(0)

0 comments on commit 60e6520

Please sign in to comment.