Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a new helper class to factorize library tests #137

Merged
merged 4 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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