Cleanup, beginning to split requirements.txt

This commit is contained in:
kdmukai
2023-03-12 12:59:12 -05:00
parent 25cb92a31f
commit 1ff844062d
5 changed files with 12 additions and 32 deletions
+3
View File
@@ -0,0 +1,3 @@
picamera==1.13
RPi.GPIO==0.7.0
spidev==3.5
-3
View File
@@ -1,10 +1,7 @@
embit==0.7.0
numpy==1.21.1
picamera==1.13
Pillow==8.2.0
-e git+https://github.com/seedsigner/pyzbar.git@c3c237821c6a20b17953efe59b90df0b514a1c03#egg=pyzbar
qrcode==7.3.1
RPi.GPIO==0.7.0
six==1.16.0
spidev==3.5
urtypes @ git+https://github.com/selfcustody/urtypes.git@7fb280eab3b3563dfc57d2733b0bf5cbc0a96a6a
+1 -1
View File
@@ -270,7 +270,7 @@ class SeedReviewPassphraseView(View):
fingerprint_without = self.seed.get_fingerprint(network=network)
self.seed.set_passphrase(passphrase)
# Because we have ane explicit "Edit" button, we disable "BACK" to keep the
# Because we have an explicit "Edit" button, we disable "BACK" to keep the
# routing options sane.
selected_menu_num = self.run_screen(
seed_screens.SeedReviewPassphraseScreen,
+7 -3
View File
@@ -119,14 +119,18 @@ class FlowTest(BaseTest):
with patch(qualname + ".run_screen") as mock_run_screen:
next_destination._instantiate_view()
if flow_step.run_before:
flow_step.run_before(next_destination.view)
# A few Views need to reference their Screen; need to mock it out
# since we're not actually instantiating it.
next_destination.view.screen = MagicMock()
if flow_step.button_data_selection:
mock_run_screen.return_value = next_destination.view.button_data.index(flow_step.button_data_selection)
else:
mock_run_screen.return_value = flow_step.screen_return_value
if flow_step.run_before:
flow_step.run_before(next_destination.view)
# Now we can run the View and grab its resulting next Destination
next_destination = next_destination._run_view()
except Exception as e:
+1 -25
View File
@@ -19,10 +19,6 @@ class TestSettingsFlows(FlowTest):
# Which option are we testing?
settings_entry = SettingsDefinition.get_settings_entry(SettingsConstants.SETTING__PERSISTENT_SETTINGS)
def mock_settingsmenuview_screen(view: Type[View]):
# SettingsMenuView reaches into its `self.screen` so we need to mock it out
view.screen = MagicMock()
destination = self.run_sequence(
Destination(MainMenuView),
sequence=[
@@ -31,7 +27,6 @@ class TestSettingsFlows(FlowTest):
),
FlowStep(
expected_view=settings_views.SettingsMenuView,
run_before=mock_settingsmenuview_screen,
button_data_selection=settings_entry.display_name
),
FlowStep(
@@ -52,10 +47,6 @@ class TestSettingsFlows(FlowTest):
# Which option are we testing?
settings_entry = SettingsDefinition.get_settings_entry(SettingsConstants.SETTING__COORDINATORS)
def mock_settingsmenuview_screen(view: Type[View]):
# SettingsMenuView reaches into its `self.screen` so we need to mock it out
view.screen = MagicMock()
destination = self.run_sequence(
Destination(MainMenuView),
sequence=[
@@ -64,7 +55,6 @@ class TestSettingsFlows(FlowTest):
),
FlowStep(
expected_view=settings_views.SettingsMenuView,
run_before=mock_settingsmenuview_screen,
button_data_selection=settings_entry.display_name
),
FlowStep(
@@ -90,10 +80,6 @@ class TestSettingsFlows(FlowTest):
def test_io_test(self):
""" Basic flow from MainMenuView to I/O Test View """
def mock_settingsmenuview_screen(view: Type[View]):
# SettingsMenuView reaches into its `self.screen` so we need to mock it out
view.screen = MagicMock()
destination = self.run_sequence(
Destination(MainMenuView),
sequence=[
@@ -102,7 +88,6 @@ class TestSettingsFlows(FlowTest):
),
FlowStep(
expected_view=settings_views.SettingsMenuView,
run_before=mock_settingsmenuview_screen,
button_data_selection=settings_views.SettingsMenuView.IO_TEST
),
FlowStep(
@@ -116,15 +101,7 @@ class TestSettingsFlows(FlowTest):
def test_donate(self):
""" Basic flow from MainMenuView to Donate View """
# DonateView will be the nth_entry after we include the submenu to "Advanced"
# and the I/O Test
nth_entry = len(SettingsDefinition.get_settings_entries()) + 2
def mock_settingsmenuview_screen(view: Type[View]):
# SettingsMenuView reaches into its `self.screen` so we need to mock it out
view.screen = MagicMock()
""" Basic flow from MainMenuView to Donate View """
destination = self.run_sequence(
Destination(MainMenuView),
sequence=[
@@ -133,7 +110,6 @@ class TestSettingsFlows(FlowTest):
),
FlowStep(
expected_view=settings_views.SettingsMenuView,
run_before=mock_settingsmenuview_screen,
button_data_selection=settings_views.SettingsMenuView.DONATE
),
FlowStep(