def METHOD_NAME(self):
    PTI = PeriodicTable.ColoredPeriodicTableItem
    my_items = [
        PTI("Xx", 42, 43, 44, "xaxatorium", 1002.2,
            bgcolor="#FF0000"),
        PTI("Yy", 25, 22, 44, "yoyotrium", 8.8)
    ]
    pt = PeriodicTable.PeriodicTable(elements=my_items)
    pt.setSelection(["He", "Xx"])
    selection = pt.getSelection()
    self.assertEqual(len(selection), 1)  # "He" not found
    self.assertEqual(selection[0].symbol, "Xx")
    self.assertEqual(selection[0].Z, 42)
    self.assertEqual(selection[0].col, 43)
    self.assertAlmostEqual(selection[0].mass, 1002.2)
    self.assertEqual(qt.QColor(selection[0].bgcolor),
                     qt.QColor(qt.Qt.red))
    self.assertTrue(pt.isElementSelected("Xx"))
    self.assertFalse(pt.isElementSelected("Yy"))
    self.assertRaises(KeyError, pt.isElementSelected, "Yx")