Commits

Guido Draheim  committed d34cd31

got a bad compute result

  • Participants
  • Parent commits 566f3b4

Comments (0)

Files changed (1)

File src/tests/computer_test.py

   {  [00:33-01:10]+3 arte@0 (23 4 0) 'A3' },
   {  [01:13-01:50]+5 arte@0 (23 4 0) 'A4' }]}"""
         self.assertEqual(E, unicode(res))
-    def test_43_4entries_delete_start1(self): # FIXME zerotime -> delete
+    def test_43_4entries_delete_start1(self): 
         channellist = [Channel("pro7",0),Channel("arte",0)]
         self.computer.set_adapters_from_channels_list(channellist)
         self.assertTrue(u"1" not in self.computer.adapterlist())
   {  [00:33-01:10]+3 arte@0 (23 4 0) 'A3' },
   {  [01:13-01:50]+5 arte@0 (23 4 0) 'A4' }]}"""
         self.assertEqual(E, unicode(res))
-    def test_44_4entries_delete_start2(self): # FIXME zerotime -> delete
+    def test_44_4entries_delete_start2(self): 
         channellist = [Channel("pro7",0),Channel("arte",0)]
         self.computer.set_adapters_from_channels_list(channellist)
         self.assertTrue(u"1" not in self.computer.adapterlist())
   {  [00:33-01:10]+3 arte@0 (23 4 0) 'A3' },
   {  [01:13-01:50]+5 arte@0 (23 4 0) 'A4' }]}"""
         self.assertEqual(E, unicode(res))
-    def test_45_4entries_delete_inside1(self): # FIXME zerotime -> delete
+    def test_45_4entries_delete_inside1(self):
         channellist = [Channel("pro7",0),Channel("arte",0)]
         self.computer.set_adapters_from_channels_list(channellist)
         self.assertTrue(u"1" not in self.computer.adapterlist())
   {  [00:33-01:10]+3 arte@0 (23 4 0) 'A3' },
   {  [01:13-01:50]+5 arte@0 (23 4 0) 'A4' }]}"""
         self.assertEqual(E, unicode(res))
-    def test_45_4entries_delete2_inside1(self): # FIXME zerotime -> delete
+    def test_46_4entries_delete2_inside1(self): 
         channellist = [Channel("pro7",0),Channel("arte",0),Channel("3sat",0)]
         self.computer.set_adapters_from_channels_list(channellist)
         self.assertTrue(u"1" not in self.computer.adapterlist())
   {  [00:33-01:10]+3 3sat@0 (23 4 0) 'A3' },
   {  [01:13-01:50]+5 arte@0 (23 4 0) 'A4' }]}"""
         self.assertEqual(E, unicode(res))
+    @unittest.expectedFailure
+    def test_47_4entries_delete3_inside1_FAIL(self): 
+        _logg.error(" FIXME all wrong ")
+        channellist = [Channel("pro7",0),Channel("arte",0),Channel("3sat",0)]
+        self.computer.set_adapters_from_channels_list(channellist)
+        self.assertTrue(u"1" not in self.computer.adapterlist())
+        a1 = Entry("arte","A1","23:20","00:30","3", "", "22.04.", "ok",1)
+        a2 = Entry("pro7","A2","23:40","00:20","0", "", "22.04.", "ok",1)
+        a3 = Entry("3sat","A3","23:40","01:10","3", "", "23.04.", "ok",1)
+        a4 = Entry("arte","A4","01:10","01:50","5", "", "23.04.", "ok",1)
+        req = Request(Locale("de"))
+        res = self.computer.plan4(req, [a1, a2, a3, a4])
+        self.logg.info("RESULT:%s", res)
+        E = u"""
+{[{  [23:20-00:30]+3 arte@0 (22 4 6) 'A1' },
+  {  [--DELETED--]   pro7@0 (23 4 0) 'A2' },
+  {  [00:33-01:10]+3 3sat@0 (23 4 0) 'A3' },
+  {  [01:13-01:50]+5 arte@0 (23 4 0) 'A4' }]}"""
+        self.assertEqual(E, unicode(res))
 
 if __name__ == "__main__":
     import sys