test_sankey.py 310 B

123456789101112
  1. from matplotlib.sankey import Sankey
  2. def test_sankey():
  3. # lets just create a sankey instance and check the code runs
  4. sankey = Sankey()
  5. sankey.add()
  6. def test_label():
  7. s = Sankey(flows=[0.25], labels=['First'], orientations=[-1])
  8. assert s.diagrams[0].texts[0].get_text() == 'First\n0.25'