def test_pressing_copytoselection_button_will_make_selected_assets_have_current_group(self):
self.create_a_new_project()
from PyQt5.QtTest import QTest
from PyQt5.QtCore import Qt
self.test_pressing_select_diameter_button_will_select_items_with_current_diameter(
) # now we have 113 and 121 selected
dw = self.aw.datawindow
dw.ui.no_groups.setValue(4)
dw.ui.grouptocopy.setCurrentText(dw._getgroupname(1)) # we have selected group G01
self.assertEqual(dw.myplotitems['113'].my_group.currentText(),
dw._getgroupname(0)) # still the group of this item should be G00
# now click the button
QTest.mouseClick(dw.ui.copytoselection, Qt.LeftButton)
self.assertEqual(dw.myplotitems['113'].my_group.currentText(),
dw._getgroupname(1)) # still the group of this item should be G00
self.assertEqual(dw.myplotitems['121'].my_group.currentText(),
dw._getgroupname(1)) # still the group of this item should be G00
评论列表
文章目录