Ejemplo n.º 1
0
 def test_dict(self):
     """
     Dicts elements are displayed using C{str()}.
     """
     s = {"a": 0}
     m = text.stringyString(s)
     self.assertEqual(m, "{a: 0}")
Ejemplo n.º 2
0
 def test_list(self):
     """
     List elements are displayed on separate lines using C{str()}.
     """
     s = ["a", "b"]
     m = text.stringyString(s)
     self.assertEqual(m, "[a,\n b,]\n")
Ejemplo n.º 3
0
 def test_tuple(self):
     """
     Tuple elements are displayed on separate lines.
     """
     s = ("a", "b")
     m = text.stringyString(s)
     self.assertEqual(m, "(a,\n b,)\n")
Ejemplo n.º 4
0
 def test_tuple(self):
     """
     Tuple elements are displayed on separate lines.
     """
     s = ('a', 'b')
     m = text.stringyString(s)
     self.assertEqual(m, '(a,\n b,)\n')
Ejemplo n.º 5
0
 def test_list(self):
     """
     List elements are displayed on separate lines using C{str()}.
     """
     s = ['a', 'b']
     m = text.stringyString(s)
     self.assertEqual(m, '[a,\n b,]\n')
Ejemplo n.º 6
0
 def test_dict(self):
     """
     Dicts elements are displayed using C{str()}.
     """
     s = {'a': 0}
     m = text.stringyString(s)
     self.assertEqual(m, '{a: 0}')
Ejemplo n.º 7
0
 def test_tuple(self):
     """
     Tuple elements are displayed on separate lines.
     """
     s = ('a', 'b')
     m = text.stringyString(s)
     self.assertEqual(m, '(a,\n b,)\n')