Skip to content

Commit

Permalink
Merge pull request #8 from benmalef/add_test_logging
Browse files Browse the repository at this point in the history
add logging testing
  • Loading branch information
benmalef authored Jul 3, 2024
2 parents 04fee16 + 06c9d80 commit b29e4ef
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ tutorials/classification_medmnist_notebook/output_stats
tutorials/classification_medmnist_notebook/model
tutorials/classification_medmnist_notebook/dataset/*.csv
testing/test_deploy
tmp
20 changes: 20 additions & 0 deletions testing/test_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import SimpleITK as sitk
import numpy as np
import pandas as pd
import logging

from pydicom.data import get_testdata_file
import cv2
Expand Down Expand Up @@ -3160,3 +3161,22 @@ def test_generic_data_split():
sanitize_outputDir()

print("passed")

def test_gandlf_logging():
print("52: Starting test for logging")

gandlf_logger_setup()
message = "Testing logging"

logging.info(message)

with open('tmp/gandlf/gandlf.log', 'r') as log_file:
logs = log_file.read()
assert message in logs

print("passed")





0 comments on commit b29e4ef

Please sign in to comment.