Exemplo n.º 1
0
 def test_roundtrip_format_unicode(self):
     for _ in range(500):
         v = get_random_object()
         self.assertEqual(v, tnetstring.loads(tnetstring.dumps(v)))
         self.assertEqual((v, b''), tnetstring.pop(tnetstring.dumps(v)))
Exemplo n.º 2
0
 def test_roundtrip_format_unicode(self):
     for _ in range(500):
         v = get_random_object()
         self.assertEqual(v, tnetstring.loads(tnetstring.dumps(v)))
         self.assertEqual((v, b''), tnetstring.pop(tnetstring.dumps(v)))
Exemplo n.º 3
0
 def test_roundtrip_format_examples(self):
     for data, expect in FORMAT_EXAMPLES.items():
         self.assertEqual(expect, tnetstring.loads(data))
         self.assertEqual(
             expect, tnetstring.loads(tnetstring.dumps(expect)))
         self.assertEqual((expect, b''), tnetstring.pop(data))
Exemplo n.º 4
0
 def test_roundtrip_format_examples(self):
     for data, expect in FORMAT_EXAMPLES.items():
         self.assertEqual(expect, tnetstring.loads(data))
         self.assertEqual(
             expect, tnetstring.loads(tnetstring.dumps(expect)))
         self.assertEqual((expect, b''), tnetstring.pop(data))