From de9b9590de60bc7526b8a29528c7d82fa2a23e71 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 9 Jan 2019 23:34:44 +0100 Subject: [PATCH] tests: add test for HashVal reading from hex stream --- tests/express/test_hashval.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/express/test_hashval.py diff --git a/tests/express/test_hashval.py b/tests/express/test_hashval.py new file mode 100644 index 0000000000..b2334e24d9 --- /dev/null +++ b/tests/express/test_hashval.py @@ -0,0 +1,9 @@ +from panda3d import core +import random + + +def test_hashval_hex(): + hex = '%032x' % random.getrandbits(32 * 4) + val = core.HashVal() + val.input_hex(core.StringStream(hex.encode('ascii'))) + assert str(val) == hex.lower()