def test_raises_exception_if_file_is_empty(self): ensure_removed(FILE_PATH) open(FILE_PATH, mode='w').close() assert_raises(OperatingSystemError, lines_from_file, FILE_PATH)
def test_raises_exception_if_file_is_not_found(self): ensure_removed(FILE_PATH) assert_raises(IOError, lines_from_file, FILE_PATH)