Example #1
0
 def test_sefofsetofstr(self):
     self.assertEqual(
         '{{a, b, c}, {d, e}}',
         letstr({frozenset({'a', 'b', 'c'}),
                 frozenset({'d', 'e'})}))
Example #2
0
 def test_tupleofesefofstr(self):
     self.assertEqual('(d, {a, b, c})', letstr(({'a', 'b', 'c'}, 'd')))
Example #3
0
 def test_listofesefofstr(self):
     self.assertEqual('[(d), e, {a, b, c}]',
                      letstr([{'a', 'b', 'c'}, ('d', ), 'e']))
Example #4
0
 def test_sefofstr(self):
     self.assertEqual('{a, b, c}', letstr({'a', 'b', 'c'}))
Example #5
0
 def test_emptyfrozenset(self):
     self.assertEqual('{}', letstr(frozenset()))
Example #6
0
 def test_emptyset(self):
     self.assertEqual('{}', letstr(set()))
Example #7
0
    def test_obj(self):
        class AClass:
            def __repr__(self):
                return 'AClass'

        self.assertEqual('AClass', letstr(AClass()))
Example #8
0
 def test_str(self):
     self.assertEqual('test', letstr('test'))