Skip to content

Commit

Permalink
Update crc32 in test
Browse files Browse the repository at this point in the history
  • Loading branch information
juntyr committed Jul 19, 2024
1 parent 8d2d76f commit 2e6d9f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/numcodecs-python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ mod tests {
let codec = Registry::get_codec(config.as_borrowed())?;
assert_eq!(codec.class().codec_id()?, "crc32");

let data = &[1, 2, 3, 4];
let data = &[1_u8, 2, 3, 4];

let encoded = codec.encode(
numpy::PyArray1::from_slice_bound(py, data)
Expand All @@ -323,10 +323,10 @@ mod tests {
)?;
let decoded = codec.decode(encoded.as_borrowed(), None)?;

let encoded: Vec<i32> = encoded.extract()?;
let decoded: Vec<i32> = decoded.extract()?;
let encoded: Vec<u8> = encoded.extract()?;
let decoded: Vec<u8> = decoded.extract()?;

assert_eq!(encoded, [123]);
assert_eq!(encoded, [239, 212, 5, 175, 1, 2, 3, 4]);
assert_eq!(decoded, data);

let config = codec.get_config()?;
Expand Down

0 comments on commit 2e6d9f1

Please sign in to comment.