From ddbdefc5581a0a361c17a4518cb0793061c18e99 Mon Sep 17 00:00:00 2001 From: Kurt Rose Date: Wed, 16 Oct 2024 17:40:37 -0700 Subject: [PATCH] add no-copy-of-sentinels test --- tests/test_typeutils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_typeutils.py b/tests/test_typeutils.py index 66ba1db..68c5fe9 100644 --- a/tests/test_typeutils.py +++ b/tests/test_typeutils.py @@ -1,3 +1,4 @@ +import copy import pickle from boltons.typeutils import make_sentinel @@ -10,3 +11,8 @@ def test_sentinel_falsiness(): def test_sentinel_pickle(): assert pickle.dumps(NOT_SET) + +def test_sentinel_copy(): + test = make_sentinel('test') + assert test is copy.copy(test) + assert test is copy.deepcopy(test)