From 01b0fee4b43127e45b7c4eefcd661848df7d5a8c Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Tue, 27 Jul 2021 01:25:00 +0300 Subject: [PATCH] Move to pyelliptic.tests also test_blindsig and test_openssl --- src/{ => pyelliptic}/tests/test_blindsig.py | 5 ++++- src/{ => pyelliptic}/tests/test_openssl.py | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) rename src/{ => pyelliptic}/tests/test_blindsig.py (98%) rename src/{ => pyelliptic}/tests/test_openssl.py (89%) diff --git a/src/tests/test_blindsig.py b/src/pyelliptic/tests/test_blindsig.py similarity index 98% rename from src/tests/test_blindsig.py rename to src/pyelliptic/tests/test_blindsig.py index ad6673e7..9ed72081 100644 --- a/src/tests/test_blindsig.py +++ b/src/pyelliptic/tests/test_blindsig.py @@ -5,7 +5,10 @@ import os import unittest from hashlib import sha256 -from pybitmessage.pyelliptic import ECCBlind, ECCBlindChain, OpenSSL +try: + from pyelliptic import ECCBlind, ECCBlindChain, OpenSSL +except ImportError: + from pybitmessage.pyelliptic import ECCBlind, ECCBlindChain, OpenSSL # pylint: disable=protected-access diff --git a/src/tests/test_openssl.py b/src/pyelliptic/tests/test_openssl.py similarity index 89% rename from src/tests/test_openssl.py rename to src/pyelliptic/tests/test_openssl.py index c62bb8b3..cb789277 100644 --- a/src/tests/test_openssl.py +++ b/src/pyelliptic/tests/test_openssl.py @@ -3,7 +3,10 @@ Test if OpenSSL is working correctly """ import unittest -from pybitmessage.pyelliptic.openssl import OpenSSL +try: + from pyelliptic.openssl import OpenSSL +except ImportError: + from pybitmessage.pyelliptic import OpenSSL try: OpenSSL.BN_bn2binpad @@ -33,7 +36,7 @@ class TestOpenSSL(unittest.TestCase): @unittest.skipUnless(have_pad, 'Skipping OpenSSL pad test') def test_padding(self): - """Test an alternatie implementation of bn2binpad""" + """Test an alternative implementation of bn2binpad""" ctx = OpenSSL.BN_CTX_new() a = OpenSSL.BN_new()