Skip to content

Commit 7bdbb45

Browse files
committed
test the hashes are unique
1 parent 5a31514 commit 7bdbb45

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

stringdtype/tests/test_stringdtype.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,24 @@ def dtype(na_object, coerce):
4949

5050

5151
def test_dtype_creation():
52+
hashes = set()
5253
dt = StringDType()
5354
assert not hasattr(dt, "na_object") and dt.coerce == 1
55+
hashes.add(hash(dt))
5456

5557
dt = StringDType(na_object=None)
5658
assert dt.na_object is None and dt.coerce == 1
59+
hashes.add(hash(dt))
5760

5861
dt = StringDType(coerce=False)
5962
assert not hasattr(dt, "na_object") and dt.coerce == 0
63+
hashes.add(hash(dt))
6064

6165
dt = StringDType(na_object=None, coerce=False)
6266
assert dt.na_object is None and dt.coerce == 0
67+
hashes.add(hash(dt))
68+
69+
assert len(hashes) == 4
6370

6471

6572
def test_scalar_creation():

0 commit comments

Comments
 (0)