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

Function test_collections_counter

IPython/lib/tests/test_pretty.py:354–363  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

352 nt.assert_equal(pretty.pretty(obj), expected)
353
354def test_collections_counter():
355 class MyCounter(Counter):
356 pass
357 cases = [
358 (Counter(), 'Counter()'),
359 (Counter(a=1), "Counter({'a': 1})"),
360 (MyCounter(a=1), "MyCounter({'a': 1})"),
361 ]
362 for obj, expected in cases:
363 nt.assert_equal(pretty.pretty(obj), expected)
364
365def test_mappingproxy():
366 MP = types.MappingProxyType

Callers

nothing calls this directly

Calls 2

MyCounterClass · 0.85
prettyMethod · 0.80

Tested by

no test coverage detected