-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,5 +100,10 @@ jobs: | |
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }} | ||
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }} | ||
|
||
- name: cargo test --all-targets --all-features | ||
run: cargo test --all-targets --all-features | ||
# Building with `--all-features` requires extra build tools like `nasm`. | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
pixi-version: v0.25.0 | ||
|
||
- name: pixi run cargo test --all-targets --all-features | ||
run: pixi run cargo test --all-targets --all-features |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from __future__ import annotations | ||
|
||
import numpy as np | ||
from rerun import datatypes | ||
|
||
|
||
def test_utf8_batch_single() -> None: | ||
single_string = "hello" | ||
list_of_one_string = ["hello"] | ||
array_of_one_string = np.array(["hello"]) | ||
|
||
assert ( | ||
datatypes.Utf8Batch(single_string).as_arrow_array() == datatypes.Utf8Batch(list_of_one_string).as_arrow_array() | ||
) | ||
|
||
assert ( | ||
datatypes.Utf8Batch(single_string).as_arrow_array() == datatypes.Utf8Batch(array_of_one_string).as_arrow_array() | ||
) | ||
|
||
|
||
def test_utf8_batch_many() -> None: | ||
# different string length to be sure | ||
list_of_strings = ["hell", "worlds"] | ||
array_of_strings = np.array(["hell", "worlds"]) | ||
|
||
assert ( | ||
datatypes.Utf8Batch(list_of_strings).as_arrow_array() == datatypes.Utf8Batch(array_of_strings).as_arrow_array() | ||
) |