Skip to content

Commit

Permalink
test: memoryview of Apache Arrow buffers (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbreddels committed Sep 11, 2020
1 parent b69d1ba commit 4e3a6f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
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

0 comments on commit 4e3a6f2

Please sign in to comment.