Skip to content

Commit

Permalink
Merge pull request #137 from LedgerHQ/fbe/exchange_test_runner
Browse files Browse the repository at this point in the history
Use a new helper class to factorize library tests
  • Loading branch information
fbeutin-ledger authored Jul 26, 2023
2 parents 6a0604f + b3ddccb commit 2c48669
Show file tree
Hide file tree
Showing 416 changed files with 521 additions and 1,681 deletions.
6 changes: 5 additions & 1 deletion test/python/apps/exchange_navigation_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ def __init__(self, backend: BackendInterface, navigator: Navigator, test_name: s
self._backend = backend
self._navigator = navigator
self._test_name = test_name
self._test_name_suffix = ""

def set_test_name_suffix(self, suffix: str):
self._test_name_suffix = suffix

def _navigate_and_compare(self, accept: bool):
# Default behaviors
snapshots_dir_name = self._test_name
snapshots_dir_name = self._test_name + self._test_name_suffix
screen_change_after_last_instruction = True

if self._backend.firmware.is_nano:
Expand Down
344 changes: 344 additions & 0 deletions test/python/apps/exchange_test_runner.py

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions test/python/apps/solana_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ def lamports_to_bytes(lamports: int) -> str:
FEES = sol_to_lamports(0.00000564)
FEES_BYTES = lamports_to_bytes(FEES)

FEES_2 = sol_to_lamports(0.0005543)
FEES_2_BYTES = lamports_to_bytes(FEES_2)


### Proposed foreign and owned addresses ###

Expand Down
2 changes: 1 addition & 1 deletion test/python/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

configuration.OPTIONAL.SIDELOADED_APPS_DIR = "test/python/lib_binaries/"

configuration.OPTIONAL.BACKEND_SCOPE = "function"
configuration.OPTIONAL.BACKEND_SCOPE = "class"

#########################
### CONFIGURATION END ###
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Loading

0 comments on commit 2c48669

Please sign in to comment.