Add gmpy.mpz handler to pytest
@@ -8,6 +8,14 @@ from helper import SkippableTest
import jsonpickle
+@pytest.fixture(scope='module', autouse=True)
+def gmpy_extension():
+ """Initialize the gmpy extension for this test module"""
+ jsonpickle.ext.gmpy.register_handlers()
+ yield # control to the test function.
+ jsonpickle.ext.gmpy.unregister_handlers()
+
+
class EcdsaTestCase(SkippableTest):
def setUp(self):
try:
