Skip to content

Comments

Add unit tests for flatten and iflatten in utils.py#331

Merged
Gallaecio merged 3 commits intoscrapy:masterfrom
IkramKhanNiazi:add-utils-tests
Dec 15, 2025
Merged

Add unit tests for flatten and iflatten in utils.py#331
Gallaecio merged 3 commits intoscrapy:masterfrom
IkramKhanNiazi:add-utils-tests

Conversation

@IkramKhanNiazi
Copy link
Contributor

  • Added tests for flatten with nested iterables including lists, tuples, sets, and generators.
  • Added tests for iflatten to ensure it correctly returns an iterator over nested iterables.

@IkramKhanNiazi
Copy link
Contributor Author

@wRAR, could you please review this PR?

@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.18%. Comparing base (fd183dd) to head (fc6ad79).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #331   +/-   ##
=======================================
  Coverage   95.18%   95.18%           
=======================================
  Files           5        5           
  Lines         436      436           
  Branches       76       76           
=======================================
  Hits          415      415           
  Misses         13       13           
  Partials        8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wRAR
Copy link
Member

wRAR commented Dec 10, 2025

It may be more simple to just add a doctest to iflatten().

@IkramKhanNiazi IkramKhanNiazi requested a review from wRAR December 15, 2025 10:08
@Gallaecio Gallaecio merged commit 0cb0e85 into scrapy:master Dec 15, 2025
23 checks passed
@IkramKhanNiazi IkramKhanNiazi deleted the add-utils-tests branch December 15, 2025 10:52
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.

3 participants