A test case for proofofwork module with simple test for empty cpow
This commit is contained in:
parent
f6cb3ad016
commit
1fbded5d14
23
src/tests/test_proofofwork.py
Normal file
23
src/tests/test_proofofwork.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
"""
|
||||
Tests for proofofwork module
|
||||
"""
|
||||
import unittest
|
||||
|
||||
from .common import skip_python3
|
||||
|
||||
skip_python3() # noqa:E402
|
||||
|
||||
from pybitmessage import proofofwork
|
||||
|
||||
|
||||
class TestProofofwork(unittest.TestCase):
|
||||
"""The main test case for proofofwork"""
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
proofofwork.init()
|
||||
|
||||
def test_empty(self):
|
||||
"""just reproducing the empty test from proofofwork.init()"""
|
||||
self.assertEqual(
|
||||
proofofwork._doCPoW(2**63, ""), [6485065370652060397, 4])
|
Reference in New Issue
Block a user