Skip to content

perf(test): optimize pypi add tests#5048

Merged
baszalmstra merged 1 commit intoprefix-dev:mainfrom
baszalmstra:optimize-pypi-add-tests
Dec 3, 2025
Merged

perf(test): optimize pypi add tests#5048
baszalmstra merged 1 commit intoprefix-dev:mainfrom
baszalmstra:optimize-pypi-add-tests

Conversation

@baszalmstra
Copy link
Contributor

@baszalmstra baszalmstra commented Dec 2, 2025

Description

Optimizes two slow PyPI add integration tests by using local mocks instead of network calls.

Performance improvements:

Test Before After
add_pypi_functionality ~85s ~5s
add_pypi_extra_functionality ~72s ~0.4s

This PR builds on top of #5047

How Has This Been Tested?

cargo nextest run -p pixi add_pypi_functionality add_pypi_extra_functionality

Both tests pass in ~5 seconds total.

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: Claude Code

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.
  • I have verified that changes that would impact the JSON schema have been made in schema/model.py.

@baszalmstra baszalmstra changed the title Optimize pypi add tests perf(test): optimize pypi add tests Dec 2, 2025
@baszalmstra baszalmstra force-pushed the optimize-pypi-add-tests branch from 2b6bc71 to e90e1a3 Compare December 2, 2025 22:51
Use local PyPI index, conda channel, and git fixtures instead of
network calls for add_pypi_functionality and add_pypi_extra_functionality
tests.

- add_pypi_functionality: ~85s -> ~5s
- add_pypi_extra_functionality: ~72s -> ~0.4s

Add pypi-boltons, pypi-httpx, pypi-isort git fixtures for testing
PyPI git dependencies locally.
@baszalmstra baszalmstra force-pushed the optimize-pypi-add-tests branch from e90e1a3 to c90e328 Compare December 3, 2025 14:55
@baszalmstra baszalmstra marked this pull request as ready for review December 3, 2025 14:55
@baszalmstra baszalmstra enabled auto-merge (squash) December 3, 2025 14:55
@baszalmstra baszalmstra merged commit dea5654 into prefix-dev:main Dec 3, 2025
38 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