Beispiel #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}")
Beispiel #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")
Beispiel #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")
Beispiel #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')
Beispiel #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')
Beispiel #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}')
Beispiel #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')