'Test transfer of cmdset options'

def test_option_transfer(self):

    (a, b, c, d) = (self.cmdset_a, self.cmdset_b, self.cmdset_c, self.cmdset_d)
    a.no_exits = True
    a.no_objs = True
    a.no_channels = True
    a.duplicates = True
    cmdset_f = (((d + c) + b) + a)
    self.assertTrue(cmdset_f.no_exits)
    self.assertTrue(cmdset_f.no_objs)
    self.assertTrue(cmdset_f.no_channels)
    self.assertTrue(cmdset_f.duplicates)
    self.assertEqual(len(cmdset_f.commands), 8)
    cmdset_f = (((a + b) + c) + d)
    self.assertTrue(cmdset_f.no_exits)
    self.assertTrue(cmdset_f.no_objs)
    self.assertTrue(cmdset_f.no_channels)
    self.assertFalse(cmdset_f.duplicates)
    self.assertEqual(len(cmdset_f.commands), 4)
    a.priority = 2
    b.priority = 1
    c.priority = 0
    d.priority = (-1)
    cmdset_f = (((d + c) + b) + a)
    self.assertTrue(cmdset_f.no_exits)
    self.assertTrue(cmdset_f.no_objs)
    self.assertTrue(cmdset_f.no_channels)
    self.assertTrue(cmdset_f.duplicates)
    self.assertEqual(len(cmdset_f.commands), 4)
    cmdset_f = (((a + b) + c) + d)
    self.assertTrue(cmdset_f.no_exits)
    self.assertTrue(cmdset_f.no_objs)
    self.assertTrue(cmdset_f.no_channels)
    self.assertTrue(cmdset_f.duplicates)
    self.assertEqual(len(cmdset_f.commands), 4)
    a.priority = (-1)
    b.priority = 0
    c.priority = 1
    d.priority = 2
    cmdset_f = (((d + c) + b) + a)
    self.assertTrue(cmdset_f.no_exits)
    self.assertTrue(cmdset_f.no_objs)
    self.assertTrue(cmdset_f.no_channels)
    self.assertFalse(cmdset_f.duplicates)
    self.assertEqual(len(cmdset_f.commands), 4)
    cmdset_f = (((a + b) + c) + d)
    self.assertTrue(cmdset_f.no_exits)
    self.assertTrue(cmdset_f.no_objs)
    self.assertTrue(cmdset_f.no_channels)
    self.assertFalse(cmdset_f.duplicates)
    self.assertEqual(len(cmdset_f.commands), 4)
    c.no_exits = False
    b.no_objs = False
    d.duplicates = False
    cmdset_f = (((a + b) + c) + d)
    self.assertFalse(cmdset_f.no_exits)
    self.assertFalse(cmdset_f.no_objs)
    self.assertTrue(cmdset_f.no_channels)
    self.assertFalse(cmdset_f.duplicates)
    self.assertEqual(len(cmdset_f.commands), 4)
    a.priority = 0
    b.priority = 0
    c.priority = 0
    d.priority = 0
    c.duplicates = True
    cmdset_f = (((d + b) + c) + a)
    self.assertEqual(len(cmdset_f.commands), 10)
