mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-18 11:21:11 +00:00
tests: Move to trezorlib.tests
This commit is contained in:
parent
57ad0fe729
commit
1c8f03968c
@ -1,3 +1,3 @@
|
|||||||
recursive-include tests *.py *.sh *.json
|
|
||||||
recursive-include bash_completion.d *.sh
|
recursive-include bash_completion.d *.sh
|
||||||
|
include trezorlib/tests/txcache/*.json
|
||||||
include COPYING
|
include COPYING
|
||||||
|
2
setup.py
2
setup.py
@ -29,6 +29,8 @@ setup(
|
|||||||
'trezorlib',
|
'trezorlib',
|
||||||
'trezorlib.messages',
|
'trezorlib.messages',
|
||||||
'trezorlib.qt',
|
'trezorlib.qt',
|
||||||
|
'trezorlib.tests.device_tests',
|
||||||
|
'trezorlib.tests.unit_tests',
|
||||||
],
|
],
|
||||||
scripts=['trezorctl'],
|
scripts=['trezorctl'],
|
||||||
install_requires=install_requires,
|
install_requires=install_requires,
|
||||||
|
0
trezorlib/tests/__init__.py
Normal file
0
trezorlib/tests/__init__.py
Normal file
0
trezorlib/tests/device_tests/__init__.py
Normal file
0
trezorlib/tests/device_tests/__init__.py
Normal file
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
from trezorlib import messages
|
from trezorlib import messages
|
||||||
|
|
@ -19,7 +19,7 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
from trezorlib import ed25519raw, ed25519cosi
|
from trezorlib import ed25519raw, ed25519cosi
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
import trezorlib.ckd_public as bip32
|
import trezorlib.ckd_public as bip32
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import trezorlib.ckd_public as bip32
|
import trezorlib.ckd_public as bip32
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import trezorlib.ckd_public as bip32
|
import trezorlib.ckd_public as bip32
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import trezorlib.ckd_public as bip32
|
import trezorlib.ckd_public as bip32
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
|
|
@ -20,7 +20,7 @@ from __future__ import print_function
|
|||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import math
|
import math
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
import trezorlib.messages as proto
|
import trezorlib.messages as proto
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import trezorlib.ckd_public as bip32
|
import trezorlib.ckd_public as bip32
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
|
|
||||||
class TestDeviceLoad(common.TrezorTest):
|
class TestDeviceLoad(common.TrezorTest):
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
|
|
||||||
class TestDeviceLoadXprv(common.TrezorTest):
|
class TestDeviceLoadXprv(common.TrezorTest):
|
@ -16,7 +16,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
|
|
@ -19,7 +19,7 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
|
|
@ -19,7 +19,7 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
from mnemonic import Mnemonic
|
from mnemonic import Mnemonic
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
from mnemonic import Mnemonic
|
from mnemonic import Mnemonic
|
@ -22,7 +22,7 @@ import unittest
|
|||||||
import binascii
|
import binascii
|
||||||
import hashlib
|
import hashlib
|
||||||
import struct
|
import struct
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
@ -16,7 +16,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
@ -16,7 +16,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
@ -16,7 +16,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
@ -16,7 +16,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
'''
|
'''
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
import base64
|
import base64
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
import base64
|
import base64
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
import base64
|
import base64
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
|
|
@ -19,7 +19,7 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import binascii
|
import binascii
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
from trezorlib.client import CallException
|
from trezorlib.client import CallException
|
@ -20,7 +20,7 @@ from __future__ import print_function
|
|||||||
|
|
||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
from trezorlib.client import PinException, CallException
|
from trezorlib.client import PinException, CallException
|
@ -17,7 +17,7 @@
|
|||||||
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
# along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import common
|
from . import common
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
@ -21,7 +21,7 @@ from __future__ import print_function
|
|||||||
import unittest
|
import unittest
|
||||||
import binascii
|
import binascii
|
||||||
import sys
|
import sys
|
||||||
import common
|
from . import common
|
||||||
|
|
||||||
from trezorlib import messages as proto
|
from trezorlib import messages as proto
|
||||||
|
|
0
trezorlib/tests/unit_tests/__init__.py
Normal file
0
trezorlib/tests/unit_tests/__init__.py
Normal file
Loading…
Reference in New Issue
Block a user