Beispiel #1
0
 def test_len(self):
     cmd = CommandListBase()
     self.assertEqual(0, len(cmd))
     cmd.append(Command())
     self.assertEqual(1, len(cmd))
Beispiel #2
0
 def test_bool(self):
     cmd = CommandListBase()
     self.assertFalse(bool(cmd))
     cmd.append(Command())
     self.assertTrue(bool(cmd))
Beispiel #3
0
 def test_append(self):
     cmd_list = CommandListBase()
     cmd = Command()
     cmd_list.append(cmd)
     self.assertEqual(cmd, cmd_list[0])