8000 Replace assert statements with ValueError by DB-db-dron · Pull Request #6877 · scrapy/scrapy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Replace assert statements with ValueError #6877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

DB-db-dron
Copy link

Fix #6876

@DB-db-dron
Copy link
Author

@Gallaecio Unable to understand why these checks are failing. Can you please look into them

@wRAR
Copy link
Member
wRAR commented Jun 8, 2025

@DB-db-dron #6878

@wRAR wRAR closed this Jun 9, 2025
@wRAR wRAR reopened this Jun 9, 2025
Copy link
codecov bot commented Jun 9, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 90.85%. Comparing base (92c18d1) to head (5228f86).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
scrapy/settings/__init__.py 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6877      +/-   ##
==========================================
- Coverage   90.86%   90.85%   -0.02%     
==========================================
  Files         165      165              
  Lines       12583    12585       +2     
  Branches     1643     1645       +2     
==========================================
  Hits        11434    11434              
- Misses        837      838       +1     
- Partials      312      313       +1     
Files with missing lines Coverage Δ
scrapy/settings/__init__.py 97.04% <50.00%> (-0.83%) ⬇️

@DB-db-dron
Copy link
Author
DB-db-dron commented Jun 14, 2025

@wRAR one check is still failing. Do I need to add tests for the changes i made?

@DB-db-dron DB-db-dron force-pushed the assert-to-valueerror-getdictorlist branch from 5228f86 to 853000f Compare June 14, 2025 08:15
@DB-db-dron
Copy link
Author

I have added the test, but code coverage is still failing, don't understand why.

@wRAR
Copy link
Member
wRAR commented Jun 14, 2025

The test is just for one of two places that were changed. The second place handles JSON values, so I think you can write a test that uses a JSON value that doesn't deserialize into a dict or list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-typing assert in getdictorlist()
2 participants
0