diff --git a/src/tests/test_proofofwork.py b/src/tests/test_proofofwork.py new file mode 100644 index 00000000..567c201d --- /dev/null +++ b/src/tests/test_proofofwork.py @@ -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])