Skip to content

Add OWN_GIL tests for Channel, ByteChannel, and Buffer operations#45

Merged
benoitc merged 3 commits intomainfrom
feature/owngil-erlang-api-tests
Mar 20, 2026
Merged

Add OWN_GIL tests for Channel, ByteChannel, and Buffer operations#45
benoitc merged 3 commits intomainfrom
feature/owngil-erlang-api-tests

Conversation

@benoitc
Copy link
Owner

@benoitc benoitc commented Mar 20, 2026

Summary

  • Add Channel class tests: receive, iteration, context manager
  • Add ByteChannel tests: send_bytes, try_receive_bytes, iteration
  • Add Buffer tests: read methods, at_eof detection

8 new tests added to the erlang_api group in py_owngil_features_SUITE.

benoitc added 3 commits March 20, 2026 22:26
- Add erlang_api test group with 8 tests
- Test whereis basic, nonexistent, with send, and parallel
- Test atom equality and roundtrip (note: atoms become strings in OWN_GIL)
- Test Ref type check and uniqueness
- Test Pid equality, hashing, dict key, set membership
Add atom() wrapper with caching directly in C module creation, so it's
available in OWN_GIL contexts where _erlang_impl package isn't imported.

- Add atom_wrapper_code in create_erlang_module() with:
  - _atom_cache dict for memoization
  - _MAX_USER_ATOMS limit (10000) to prevent unbounded growth
  - atom() function that wraps erlang._atom() with caching
- Add 3 new tests: atom_create, atom_create_different, atom_cache
- Add Python helpers for testing erlang.atom() in OWN_GIL mode
- Channel class: receive, iteration, context manager
- ByteChannel: send_bytes, try_receive_bytes, iteration
- Buffer: read methods, at_eof detection
@benoitc benoitc merged commit 89c4dab into main Mar 20, 2026
11 checks passed
@benoitc benoitc deleted the feature/owngil-erlang-api-tests branch March 20, 2026 21:44
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.

1 participant