Example #1
0
 def test_to_from_pkt(self):
     pkt = ts.to_pkt('UV', 5, 'still', ['1','2','3'])
     task, obs, still, args = ts.from_pkt(pkt)
     self.assertEqual(task, 'UV')
     self.assertEqual(obs, 5)
     self.assertEqual(still, 'still')
     self.assertEqual(args, ['1','2','3'])
Example #2
0
 def test_from_pkt(self):
     pkt = ts.pad('5') + ts.pad('UV') + ts.pad('4') + ts.pad('still') + ts.pad('1')
     task, obs, still, args = ts.from_pkt(pkt)
     self.assertEqual(task, 'UV')
     self.assertEqual(obs, 4)
     self.assertEqual(still, 'still')
     self.assertEqual(args, ['1'])