Test that set and frozenset use Python 3 formatting.
()
| 106 | |
| 107 | |
| 108 | def test_sets(): |
| 109 | """ |
| 110 | Test that set and frozenset use Python 3 formatting. |
| 111 | """ |
| 112 | objects = [set(), frozenset(), set([1]), frozenset([1]), set([1, 2]), |
| 113 | frozenset([1, 2]), set([-1, -2, -3])] |
| 114 | expected = ['set()', 'frozenset()', '{1}', 'frozenset({1})', '{1, 2}', |
| 115 | 'frozenset({1, 2})', '{-3, -2, -1}'] |
| 116 | for obj, expected_output in zip(objects, expected): |
| 117 | got_output = pretty.pretty(obj) |
| 118 | yield nt.assert_equal, got_output, expected_output |
| 119 | |
| 120 | |
| 121 | @skip_without('xxlimited') |