From eaec10a02e785685deab309ea6301ced6c876af1 Mon Sep 17 00:00:00 2001 From: Angus Hollands Date: Tue, 7 Nov 2023 14:54:38 +0000 Subject: [PATCH] test: update test --- tests/test_2757_attrs_metadata.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_2757_attrs_metadata.py b/tests/test_2757_attrs_metadata.py index 5d52ce6eec..ab6fcf3776 100644 --- a/tests/test_2757_attrs_metadata.py +++ b/tests/test_2757_attrs_metadata.py @@ -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 @@ -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 @@ -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