MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_format_using_callable

Function test_format_using_callable

lib/matplotlib/tests/test_sankey.py:19–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18
19def test_format_using_callable():
20 # test using callable by slightly incrementing above label example
21
22 def show_three_decimal_places(value):
23 return f'{value:.3f}'
24
25 s = Sankey(flows=[0.25], labels=['First'], orientations=[-1],
26 format=show_three_decimal_places)
27
28 assert s.diagrams[0].texts[0].get_text() == 'First\n0.250'
29
30
31@pytest.mark.parametrize('kwargs, msg', (

Callers

nothing calls this directly

Calls 2

SankeyClass · 0.90
get_textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…