Skip to content

Commit

Permalink
test: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Nov 7, 2023
1 parent 7aa4086 commit eaec10a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_2757_attrs_metadata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
from __future__ import annotations

import packaging.version
import pytest

Expand Down Expand Up @@ -30,7 +32,7 @@ def test_set_attrs():


def test_serialise_with_transient_attrs(array_pickler):
attrs = {**SOME_ATTRS, "_transient_key": lambda: None}
attrs = {**SOME_ATTRS, "@transient_key": lambda: None}
array = ak.Array([1, 2, 3], attrs=attrs)
result = array_pickler.loads(array_pickler.dumps(array))
assert result.attrs == SOME_ATTRS
Expand All @@ -44,7 +46,7 @@ def test_serialise_with_nonserialisable_attrs(array_pickler):


def test_transient_metadata_persists():
attrs = {**SOME_ATTRS, "_transient_key": lambda: None}
attrs = {**SOME_ATTRS, "@transient_key": lambda: None}
array = ak.Array([[1, 2, 3]], attrs=attrs)
num = ak.num(array)
assert num.attrs is attrs
Expand Down

0 comments on commit eaec10a

Please sign in to comment.