I am looking to do the following:
- Iterate through a file
- assert that a specific condition is notin each line
- if it returns false, log the offending row
- Continue through the entire file
This is what I currently have:
import logging
with open('checkpoints-results.log') as file:
  for row in file:
    assert '"status":"Unresolved"' not in row, logging.warning(row)
Right now it's going through and grabbing the first occurrence, but then it stops.
Am I missing something for continuing until I reach the end of the file?
 
     
    