def testNameUpdate(self):
     icon = Icon("/path/to/file123.jpg")
     self.assertEqual(icon.name, "file123")
     icon.path = "/other/path/imageFoo"
     self.assertNotEqual(icon.name, "imageFoo")
     icon.updateName()
     self.assertEqual(icon.name, "imageFoo")
     icon.path = "/another/iMg.gif"
     icon.updateName()
     self.assertEqual(icon.name, "iMg")
     self.assertEqual(icon.path, "/another/iMg.gif")
 def testNameUpdate(self):
     icon = Icon("/path/to/file123.jpg")
     self.assertEqual(icon.name, "file123")
     icon.path = "/other/path/imageFoo"
     self.assertNotEqual(icon.name, "imageFoo")
     icon.updateName()
     self.assertEqual(icon.name, "imageFoo")
     icon.path = "/another/iMg.gif"
     icon.updateName()
     self.assertEqual(icon.name, "iMg")
     self.assertEqual(icon.path, "/another/iMg.gif")