Add (deep)copy support to read only dict (#118204)

This commit is contained in:
Paulus Schoutsen
2024-05-26 23:05:45 -04:00
committed by GitHub
parent 56431ef750
commit 9dc580e5de
2 changed files with 14 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
"""Test read only dictionary."""
import copy
import json
import pytest
@@ -35,3 +36,5 @@ def test_read_only_dict() -> None:
assert isinstance(data, dict)
assert dict(data) == {"hello": "world"}
assert json.dumps(data) == json.dumps({"hello": "world"})
assert copy.deepcopy(data) == {"hello": "world"}