Skip to content

test: cover utility helper edge cases#10926

Merged
radoering merged 2 commits into
python-poetry:mainfrom
Yijian6:test-utils-helpers-coverage
Jun 21, 2026
Merged

test: cover utility helper edge cases#10926
radoering merged 2 commits into
python-poetry:mainfrom
Yijian6:test-utils-helpers-coverage

Conversation

@Yijian6

@Yijian6 Yijian6 commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • cover downloads when a response includes an invalid Content-Length header
  • cover directory() restoring the original working directory after an error
  • cover nested merge_dicts() behavior used by configuration merging

Context

Refs #3155.

This is a test-only follow-up for helper utilities with behavior that is used by downloads, command working directory handling, and config merging. The added tests focus on existing edge-case behavior without changing production code.

Tests

  • PYTHONPATH=src python -m pytest tests/utils/test_helpers.py -q
  • python -m ruff check tests/utils/test_helpers.py
  • PYTHONPATH=src python -m mypy tests/utils/test_helpers.py

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Yijian6 Yijian6 force-pushed the test-utils-helpers-coverage branch 2 times, most recently from 14597ac to 7bdb4a5 Compare May 26, 2026 13:15
@radoering radoering force-pushed the test-utils-helpers-coverage branch from 7bdb4a5 to 74b701e Compare June 21, 2026 13:19
@radoering radoering enabled auto-merge (squash) June 21, 2026 13:37
@radoering radoering merged commit 6fee9f4 into python-poetry:main Jun 21, 2026
52 checks passed
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.

2 participants