MCPcopy Create free account
hub / github.com/ipython/ipython / test_sets

Function test_sets

IPython/lib/tests/test_pretty.py:108–118  ·  view source on GitHub ↗

Test that set and frozenset use Python 3 formatting.

()

Source from the content-addressed store, hash-verified

106
107
108def 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')

Callers

nothing calls this directly

Calls 1

prettyMethod · 0.80

Tested by

no test coverage detected