Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: memoryview of Apache Arrow buffers (#9) #11

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
profile: minimal
- name: Install pytest
run: pip install pytest
- name: Install pyarrow
run: pip install pyarrow
- name: Run build.py
run: python -u tests/build.py
- name: Run pytest
Expand Down
8 changes: 8 additions & 0 deletions tests/test_blake3.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ def test_buffer_types():
assert incremental.digest() == blake3(b"foofoofoofoo").digest()


def test_arrow():
import pyarrow as pa
ar = pa.array(['foo', 'bar'])
blake = blake3()
blake.update(memoryview(ar.buffers()[1]))
blake.update(memoryview(ar.buffers()[2]))


def test_string_fails():
try:
blake3("a string")
Expand Down