Skip to content

Commit

Permalink
add no-copy-of-sentinels test
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtbrose authored and mahmoud committed Oct 17, 2024
1 parent 2ccc509 commit ddbdefc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_typeutils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import copy
import pickle

from boltons.typeutils import make_sentinel
Expand All @@ -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)

0 comments on commit ddbdefc

Please sign in to comment.