Just a tip - I don't know the exact code you're testing so this might not be relevant based on your specific context. IMO it doesn't make sense to test if the while loop breaks when check_condition() returns false. If you have if not check_condition(): break
in your while loop it will most definitely break. What you should be testing is whether check_condition is actually returning false when it should be.