File tree Expand file tree Collapse file tree 2 files changed +19
-12
lines changed
Expand file tree Collapse file tree 2 files changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -88,21 +88,17 @@ class NavigateApp(MDApp):
8888 identity_list = get_identity_list ()
8989 image_path = load_image_path ()
9090 app_platform = platform
91- kivy_state .screen_density = Window .size
92- window_size = kivy_state .screen_density
9391 tr = Lang ("en" ) # for changing in franch replace en with fr
9492
95- if os .environ .get ('INSTALL_TESTS' , False ):
96- # Set kivy app resolution while running kivy tests
97- window_size = (720 , 1280 )
98-
9993 def __init__ (self ):
10094 super (NavigateApp , self ).__init__ ()
10195 # workaround for relative imports
10296 sys .path .append (os .path .join (os .path .dirname (os .path .abspath (__file__ )), '..' ))
10397 self .data_screens , self .all_data , self .data_screen_dict , response = load_screen_json ()
10498 self .kivy_state_obj = KivyStateVariables ()
10599 self .image_dir = load_image_path ()
100+ self .kivy_state_obj .screen_density = Window .size
101+ self .window_size = self .kivy_state_obj .screen_density
106102
107103 def build (self ):
108104 """Method builds the widget"""
Original file line number Diff line number Diff line change 1+ # pylint: disable=unused-import, wrong-import-position, ungrouped-imports
2+ # flake8: noqa:E401, E402
3+
14"""Mock kivy app with mock threads."""
2- # pylint: disable=unused-import
3- # flake8: noqa:E401
45
6+ import os
7+ from kivy .config import Config
8+ import multiqueue
59from pybitmessage import state
6- from pybitmessage .bitmessagekivy .mpybit import NavigateApp
710
8- import multiqueue
9- from class_addressGenerator import FakeAddressGenerator
10- from pybitmessage .mock .network import stats , objectracker
11+ if os .environ .get ('INSTALL_TESTS' , False ):
12+ Config .set ('graphics' , 'height' , 1280 )
13+ Config .set ('graphics' , 'width' , 720 )
14+ Config .set ('graphics' , 'position' , 'custom' )
15+ Config .set ('graphics' , 'top' , 0 )
16+ Config .set ('graphics' , 'left' , 0 )
17+
18+
19+ from pybitmessage .mock .class_addressGenerator import FakeAddressGenerator # noqa:E402
20+ from pybitmessage .bitmessagekivy .mpybit import NavigateApp # noqa:E402
21+ from pybitmessage .mock .network import stats , objectracker # noqa:E402
1122
1223
1324def main ():
You can’t perform that action at this time.
0 commit comments