def test_attach(self): entry = ProxyEntry() entry.data_type = currency self.assertEqual(entry.get_property('secondary-icon-pixbuf'), None) calc = CalculatorPopup(entry, CalculatorPopup.MODE_SUB) pixbuf_pixels = calc.render_icon(STOQ_CALC, gtk.ICON_SIZE_MENU).get_pixels() self.assertEqual( entry.get_property('secondary-icon-pixbuf').get_pixels(), pixbuf_pixels) entry.set_sensitive(False) self.assertEqual(entry.get_property('secondary-icon-pixbuf'), None) entry.set_sensitive(True) self.assertEqual( entry.get_property('secondary-icon-pixbuf').get_pixels(), pixbuf_pixels) spinbutton = ProxySpinButton() spinbutton.data_type = currency self.assertEqual(spinbutton.get_property('secondary-icon-pixbuf'), None) calc = CalculatorPopup(spinbutton, CalculatorPopup.MODE_SUB) pixbuf_pixels = calc.render_icon(STOQ_CALC, gtk.ICON_SIZE_MENU).get_pixels() self.assertEqual( spinbutton.get_property('secondary-icon-pixbuf').get_pixels(), pixbuf_pixels) spinbutton.set_sensitive(False) self.assertEqual(spinbutton.get_property('secondary-icon-pixbuf'), None) spinbutton.set_sensitive(True) self.assertEqual( spinbutton.get_property('secondary-icon-pixbuf').get_pixels(), pixbuf_pixels)
def test_attach(self): entry = ProxyEntry() entry.data_type = currency self.assertEqual(entry.get_property('secondary-icon-pixbuf'), None) calc = CalculatorPopup(entry, CalculatorPopup.MODE_SUB) pixbuf_pixels = calc.render_icon(STOQ_CALC, Gtk.IconSize.MENU).get_pixels() self.assertEqual( entry.get_property('secondary-icon-pixbuf').get_pixels(), pixbuf_pixels) entry.set_sensitive(False) self.assertEqual(entry.get_property('secondary-icon-pixbuf'), None) entry.set_sensitive(True) self.assertEqual( entry.get_property('secondary-icon-pixbuf').get_pixels(), pixbuf_pixels) spinbutton = ProxySpinButton() spinbutton.data_type = currency self.assertEqual(spinbutton.get_property('secondary-icon-pixbuf'), None) calc = CalculatorPopup(spinbutton, CalculatorPopup.MODE_SUB) pixbuf_pixels = calc.render_icon(STOQ_CALC, Gtk.IconSize.MENU).get_pixels() self.assertEqual( spinbutton.get_property('secondary-icon-pixbuf').get_pixels(), pixbuf_pixels) spinbutton.set_sensitive(False) self.assertEqual(spinbutton.get_property('secondary-icon-pixbuf'), None) spinbutton.set_sensitive(True) self.assertEqual( spinbutton.get_property('secondary-icon-pixbuf').get_pixels(), pixbuf_pixels)
def testForIntFloat(self): mySpinBtn = ProxySpinButton() self.assertEqual(mySpinBtn.get_property("data-type"), 'int')
def testForIntFloat(self): mySpinBtn = ProxySpinButton() self.assertEqual(mySpinBtn.get_property("data-type"), 'int')