Skip to content

Commit c03c713

Browse files
committed
TST: fix py39 deprecation
toolz/tests/test_itertoolz.py::test_random_sample toolz/tests/test_itertoolz.py::test_random_sample toolz/tests/test_itertoolz.py::test_random_sample toolz/tests/test_itertoolz.py::test_random_sample ../lib/python3.9/random.py:100: DeprecationWarning: Seeding based on hashing is deprecated since Python 3.9 and will be removed in a subsequent version. The only supported seed types are: None, int, float, str, bytes, and bytearray. self.seed(x) explicitly hash the values before passing in
1 parent d78c2b1 commit c03c713

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

toolz/tests/test_itertoolz.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,8 @@ def test_random_sample():
542542

543543
assert rsample1 != rsample2
544544

545-
assert mk_rsample(object) == mk_rsample(object)
546-
assert mk_rsample(object) != mk_rsample(object())
545+
assert mk_rsample(hash(object)) == mk_rsample(hash(object))
546+
assert mk_rsample(hash(object)) != mk_rsample(hash(object()))
547547
assert mk_rsample(b"a") == mk_rsample(u"a")
548548

549549
assert raises(TypeError, lambda: mk_rsample([]))

0 commit comments

Comments
 (0)