Skip to content

chore: add smoke tests for packages that have entropy patches#133

Open
ryanking13 wants to merge 9 commits into
mainfrom
gyeongjae/test-entropy-patches
Open

chore: add smoke tests for packages that have entropy patches#133
ryanking13 wants to merge 9 commits into
mainfrom
gyeongjae/test-entropy-patches

Conversation

@ryanking13

Copy link
Copy Markdown
Contributor

Since we are patching these packages. I think it should be useful for us to have test coverage so we don't suddenly break these packages. I found that in newer pydantic-core version (which is available in Python 3.14), our entropy patch doesn't work (#132). I believe these tests will allow us catching those errors when 1) we update Python versions, or when 2) those packages release a new version with breaking changes in entropy.

@ask-bonk ask-bonk 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.

I'm Bonk, and I've done a quick review of your PR.

This PR adds smoke tests for packages that rely on entropy patches, verifying that they survive the workerd snapshot save/restore cycle. The structure follows existing conventions well. One issue stood out.

Comment thread packages/cli/tests/workerd-test/entropy-patches/tests/test_rust_packages.py Outdated
@ask-bonk

ask-bonk Bot commented Jun 19, 2026

Copy link
Copy Markdown

I'm Bonk, and I've done a quick review of your PR.

This PR adds smoke tests for packages that rely on entropy patches, verifying they survive the workerd snapshot save/restore cycle. The overall structure follows existing conventions well (matches the sdk test suite pattern).

I flagged one issue:

  1. test_rust_import_permutations doesn't test what it claims (test_rust_packages.py:22-32) — The three Rust packages are imported at module level (lines 13-17), so by the time the parametrized test runs, all modules are already cached in sys.modules. The __import__() calls are no-ops for every permutation. The other tests in the file (test_tiktoken_import, test_cryptography_hashing, test_jiter_parse) already cover the snapshot survival scenario, making the permutation test redundant and misleading.

github run

Comment thread packages/cli/tests/workerd-test/entropy-patches/tests/test_aiohttp_websocket.py Outdated
Comment thread packages/cli/tests/workerd-test/entropy-patches/tests/test_rust_packages.py Outdated
Comment thread packages/cli/tests/workerd-test/entropy-patches/tests/test_rust_packages.py Outdated
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