Beispiel #1
0
 def test_marshall_string_space(self):
     self.assertEqual(b"5:bla l ", marshall("bla l"))
Beispiel #2
0
 def send_msg(self, data):
     marshalled_data = marshall(data)
     # self.mutter("OUT: %r" % marshalled_data)
     self.send_fn(marshalled_data)
Beispiel #3
0
 def test_marshall_string(self):
     self.assertEqual(b"3:foo ", marshall("foo"))
Beispiel #4
0
 def test_marshall_list_nested(self):
     self.assertEqual(b"( ( ( 3 ) 4 ) ) ", marshall([[[3], 4]]))
Beispiel #5
0
 def test_marshall_list_mixed(self):
     self.assertEqual(b"( 1 3 4 3:str ) ", marshall([1,3,4,"str"]))
Beispiel #6
0
 def test_marshall_literal(self):
     self.assertEqual(b"foo ", marshall(literal("foo")))
Beispiel #7
0
 def test_marshall_int(self):
     self.assertEqual(b"1 ", marshall(1))
Beispiel #8
0
 def test_marshall_list(self):
     self.assertEqual(b"( 1 2 3 4 ) ", marshall([1,2,3,4]))
 def test_marshall_list_nested(self):
     self.assertEqual("( ( ( 3 ) 4 ) ) ", marshall([[[3], 4]]))
 def test_marshall_string_space(self):
     self.assertEqual("5:bla l ", marshall("bla l"))
 def test_marshall_string(self):
     self.assertEqual("3:foo ", marshall("foo"))
 def test_marshall_literal(self):
     self.assertEqual("foo ", marshall(literal("foo")))
 def test_marshall_list_mixed(self):
     self.assertEqual("( 1 3 4 3:str ) ", marshall([1, 3, 4, "str"]))
 def test_marshall_list(self):
     self.assertEqual("( 1 2 3 4 ) ", marshall([1, 2, 3, 4]))
 def test_marshall_int(self):
     self.assertEqual("1 ", marshall(1))