add no-copy-of-sentinels test

This commit is contained in:
Kurt Rose 2024-10-16 17:40:37 -07:00 committed by Mahmoud Hashemi
parent 2ccc5098bc
commit ddbdefc558
1 changed files with 6 additions and 0 deletions

View File

@ -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)