Update kivy test resolution
This commit is contained in:
parent
4ad0839023
commit
0b8e024c29
|
@ -88,14 +88,8 @@ class NavigateApp(MDApp):
|
|||
identity_list = get_identity_list()
|
||||
image_path = load_image_path()
|
||||
app_platform = platform
|
||||
kivy_state.screen_density = Window.size
|
||||
window_size = kivy_state.screen_density
|
||||
tr = Lang("en") # for changing in franch replace en with fr
|
||||
|
||||
if os.environ.get('INSTALL_TESTS', False):
|
||||
# Set kivy app resolution while running kivy tests
|
||||
window_size = (720, 1280)
|
||||
|
||||
def __init__(self):
|
||||
super(NavigateApp, self).__init__()
|
||||
# workaround for relative imports
|
||||
|
@ -103,6 +97,8 @@ class NavigateApp(MDApp):
|
|||
self.data_screens, self.all_data, self.data_screen_dict, response = load_screen_json()
|
||||
self.kivy_state_obj = KivyStateVariables()
|
||||
self.image_dir = load_image_path()
|
||||
self.kivy_state_obj.screen_density = Window.size
|
||||
self.window_size = self.kivy_state_obj.screen_density
|
||||
|
||||
def build(self):
|
||||
"""Method builds the widget"""
|
||||
|
|
|
@ -1,13 +1,24 @@
|
|||
# pylint: disable=unused-import, wrong-import-position, ungrouped-imports
|
||||
# flake8: noqa:E401, E402
|
||||
|
||||
"""Mock kivy app with mock threads."""
|
||||
# pylint: disable=unused-import
|
||||
# flake8: noqa:E401
|
||||
|
||||
from pybitmessage import state
|
||||
from pybitmessage.bitmessagekivy.mpybit import NavigateApp
|
||||
|
||||
import os
|
||||
from kivy.config import Config
|
||||
import multiqueue
|
||||
from class_addressGenerator import FakeAddressGenerator
|
||||
from pybitmessage.mock.network import stats, objectracker
|
||||
from pybitmessage import state
|
||||
|
||||
if os.environ.get('INSTALL_TESTS', False):
|
||||
Config.set('graphics', 'height', 1280)
|
||||
Config.set('graphics', 'width', 720)
|
||||
Config.set('graphics', 'position', 'custom')
|
||||
Config.set('graphics', 'top', 0)
|
||||
Config.set('graphics', 'left', 0)
|
||||
|
||||
|
||||
from pybitmessage.mock.class_addressGenerator import FakeAddressGenerator # noqa:E402
|
||||
from pybitmessage.bitmessagekivy.mpybit import NavigateApp # noqa:E402
|
||||
from pybitmessage.mock.network import stats, objectracker # noqa:E402
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Reference in New Issue
Block a user