Browse Source

tests: add test for HashVal reading from hex stream

rdb 7 years ago
parent
commit
de9b9590de
1 changed files with 9 additions and 0 deletions
  1. 9 0
      tests/express/test_hashval.py

+ 9 - 0
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()