示例#1
0
 def to_string(self):
     '''
     ReadStatus 객체로부터 2개의 문자열을 뽑아낸다.
     '''
     number_list = intlist_to_string([x[0] for x in self.data])
     marker_list = "".join((x[1] for x in self.data))
     return number_list, marker_list
示例#2
0
 def test_intlist_to_string_to_intlist(self):
     a = range(1024, 0, -3)
     b = libs.intlist_to_string(a)
     c = libs.string_to_intlist(b)
     if a != c:
         self.fail(repr(a) + " / " + repr(c))
示例#3
0
 def test_intlist_to_string(self):
     self.assertEqual(
         '\x03\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00',
         libs.intlist_to_string([1, 2, 3]))
示例#4
0
文件: test_libs.py 项目: hodduc/arara
 def test_intlist_to_string_to_intlist(self):
     a = range(1024, 0, -3)
     b = libs.intlist_to_string(a)
     c = libs.string_to_intlist(b)
     if a != c:
         self.fail(repr(a) + " / " + repr(c))
示例#5
0
文件: test_libs.py 项目: hodduc/arara
 def test_intlist_to_string(self):
     self.assertEqual('\x03\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00',
             libs.intlist_to_string([1, 2, 3]))