Beispiel #1
0
 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.')
Beispiel #2
0
 def runTest(self):
     set_current_lesson_index(0)
     lesson = get_current_lesson()
     self.assertEqual(lesson, lessons[0])
Beispiel #3
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)
Beispiel #4
0
 def runTest(self):
     set_current_lesson_index(len(lessons)-1)
     next = get_next_lesson()
     lesson = get_current_lesson()
     self.assertEqual(lesson, next)
Beispiel #5
0
 def runTest(self):
     set_current_lesson_index(len(lessons)-1)
     lesson = get_current_lesson()
     self.assertEqual(lesson, lessons[-1])
Beispiel #6
0
 def lesson_validation():
     if lessons:
         transfer_to(
             lambda: draw_lesson(root, ttk, get_current_lesson()),
             main_frame)
     pass