Пример #1
0
 def test_widget_text(self):
     widget = FractionWidget()
     widget.set_widget_value(Gst.Fraction(1000000, 1))
     self.assertEqual(widget.text.get_text(), "1000000:1")
     widget.set_widget_value(
         Gst.Fraction(7504120000000001, 4503600000000002))
     self.assertEqual(widget.text.get_text(),
                      "7504120000000001:4503600000000002")
Пример #2
0
 def test_widget_text_magic__m(self):
     widget = FractionWidget()
     widget.set_widget_value(Gst.Fraction(1000000000, 1001))
     self.assertEqual(widget.text.get_text(), "1000000M")