def test_update(self): obj = QwtSymbol(QwtSymbol.Rect, QBrush(Qt.black), QPen(Qt.yellow), QSize(3, 3)) sym = SymbolParam(_("Symbol")) sym.update_param(obj) self.assertEqual(sym.marker, "Rect") self.assertEqual(sym.size, 3) self.assertEqual(sym.edgecolor, "#ffff00") self.assertEqual(sym.facecolor, "#000000")
def test_update(self): obj = QwtSymbol( QwtSymbol.Rect, QBrush(Qt.black), QPen(Qt.yellow), QSize(3, 3) ) sym = SymbolParam(_("Symbol")) sym.update_param( obj ) self.assertEqual(sym.marker, "Rect") self.assertEqual(sym.size, 3) self.assertEqual(sym.edgecolor, "#ffff00") self.assertEqual(sym.facecolor, "#000000")
def test_changeconfig(self): obj = QwtSymbol( QwtSymbol.Rect, QBrush(Qt.black), QPen(Qt.yellow), QSize(3, 3) ) sym = SymbolParam(_("Symbol")) sym.update_param( obj ) sym.write_config(CONF, "sym", "" ) sym = SymbolParam(_("Symbol")) sym.read_config(CONF, "sym", "" ) self.assertEqual(sym.marker, "Rect") self.assertEqual(sym.size, 3) self.assertEqual(sym.edgecolor, "#ffff00") self.assertEqual(sym.facecolor, "#000000") sym.build_symbol()
def test_changeconfig(self): obj = QwtSymbol(QwtSymbol.Rect, QBrush(Qt.black), QPen(Qt.yellow), QSize(3, 3)) sym = SymbolParam(_("Symbol")) sym.update_param(obj) sym.write_config(CONF, "sym", "") sym = SymbolParam(_("Symbol")) sym.read_config(CONF, "sym", "") self.assertEqual(sym.marker, "Rect") self.assertEqual(sym.size, 3) self.assertEqual(sym.edgecolor, "#ffff00") self.assertEqual(sym.facecolor, "#000000") sym.build_symbol()
def test_saveconfig(self): sym = SymbolParam(_("Symbol")) sym.write_config(CONF, "sym", "") sym = SymbolParam(_("Symbol")) sym.read_config(CONF, "sym", "")
def test_default(self): sym = SymbolParam(_("Symbol")) _obj = sym.build_symbol()
def test_saveconfig(self): sym = SymbolParam(_("Symbol")) sym.write_config(CONF, "sym", "" ) sym = SymbolParam(_("Symbol")) sym.read_config(CONF, "sym", "" )