style: add flags for tests coverage

- Some are already tested but the coverage report can't see it.
- Some are not necessary to test or too hard to test on GitHub's CI
This commit is contained in:
Karim shoair
2025-08-17 01:02:14 +03:00
parent 009bbb20c0
commit 2f402f4835
13 changed files with 121 additions and 101 deletions
+6 -6
View File
@@ -52,12 +52,12 @@ class ResponseFactory:
**parser_arguments,
),
)
except Exception as e:
except Exception as e: # pragma: no cover
log.error(f"Error processing redirect: {e}")
break
current_request = current_request.redirected_from
except Exception as e:
except Exception as e: # pragma: no cover
log.error(f"Error processing response history: {e}")
return history
@@ -105,7 +105,7 @@ class ResponseFactory:
history = cls._process_response_history(first_response, parser_arguments)
try:
page_content = page.content()
except Exception as e:
except Exception as e: # pragma: no cover
log.error(f"Error getting page content: {e}")
page_content = ""
@@ -157,12 +157,12 @@ class ResponseFactory:
**parser_arguments,
),
)
except Exception as e:
except Exception as e: # pragma: no cover
log.error(f"Error processing redirect: {e}")
break
current_request = current_request.redirected_from
except Exception as e:
except Exception as e: # pragma: no cover
log.error(f"Error processing response history: {e}")
return history
@@ -212,7 +212,7 @@ class ResponseFactory:
)
try:
page_content = await page.content()
except Exception as e:
except Exception as e: # pragma: no cover
log.error(f"Error getting page content in async: {e}")
page_content = ""