Skip to content

Commit

Permalink
bugfix: add logs to debug remote test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
roryai committed Jan 9, 2024
1 parent 318fcdd commit 50b754d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def init_log_file(self, destination_directory):
suffix = 'media_transfer_logfile.txt'
filename = timestamp + suffix
log_file_path = os.path.join(destination_directory, filename)

print(f'\ndestination_directory in Logger: {destination_directory}')
print(f'\nlogfile_path in Logger: {log_file_path}')
with open(log_file_path, 'w'):
pass

Expand Down
3 changes: 3 additions & 0 deletions test/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
DBInitializer().init_test_database()
Logger().init_log_file(logfile_directory)

def plogs():
print(f'\nlogfile_directory plogs: {logfile_directory}')
print(f'\ndestination_root_directory plogs: {destination_root_directory}')

def create_files_with_desired_extensions():
for file_path in valid_source_filepaths():
Expand Down
1 change: 1 addition & 0 deletions test/test_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def test_init_log_file_creates_file():
logger = Logger()
del logger
Logger().init_log_file(logfile_directory)
plogs()

assert os.path.exists(Logger().log_file_path)

Expand Down

0 comments on commit 50b754d

Please sign in to comment.