def runTest(self): print(self.frame.winfo_width()) assert self.frame.winfo_width() <= 700, 'Main Menu width check failed.' transfer_to( lambda: draw_lesson(self.frame, self.ttk, get_current_lesson()), *self.frame.children.values()) assert self.frame.winfo_width() <= 875, 'Lesson width check failed.' assert self.frame.winfo_children( ) is not [], 'Drawn Lesson failed with no children.' transfer_to(lambda: draw_menu(self.frame, self.ttk), *self.frame.children.values()) assert self.frame.winfo_width( ) <= 700, 'Main Menu width failed after transfer from Lesson.' return print('Transition Menu Lesson Test: Pass.')
def runTest(self): set_current_lesson_index(0) lesson = get_current_lesson() self.assertEqual(lesson, lessons[0])
def runTest(self): set_current_lesson_index(len(lessons)-1) prev = get_previous_lesson() set_current_lesson_index(len(lessons)-2) lesson = get_current_lesson() self.assertEqual(lesson, prev)
def runTest(self): set_current_lesson_index(len(lessons)-1) next = get_next_lesson() lesson = get_current_lesson() self.assertEqual(lesson, next)
def runTest(self): set_current_lesson_index(len(lessons)-1) lesson = get_current_lesson() self.assertEqual(lesson, lessons[-1])
def lesson_validation(): if lessons: transfer_to( lambda: draw_lesson(root, ttk, get_current_lesson()), main_frame) pass