Comments (1)
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pygal-3.0.4-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pygal-3.0.4-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/pygal-3.0.4
collected 4414 items
pygal/test/test_bar.py .. [ 0%]
pygal/test/test_box.py .......... [ 0%]
pygal/test/test_colors.py .......................................................................................... [ 2%]
pygal/test/test_config.py ........................................................................................................................................................... [ 5%]
...FF........FF...................................................................................................................................................................... [ 9%]
..................................................................................................................................................................................... [ 14%]
..................................................................................................................................................................................... [ 18%]
..................................................F.FFF.FFFFFFFFFFFF....F.F.FFF.FFFFFFFFFFFF....F................................................. [ 21%]
pygal/test/test_date.py .............. [ 21%]
pygal/test/test_formatters.py ...... [ 21%]
pygal/test/test_graph.py ............................................................................................................................................................ [ 25%]
..................................................................................................................................................................................... [ 29%]
..................................................................................................................................................................................... [ 33%]
..................................................................................................................................................................................... [ 37%]
..................................................................................................................................................................................... [ 41%]
..................................................................................................................................................................................... [ 45%]
..................................................................................................................................................................................... [ 50%]
..................................................................................................................................................................................... [ 54%]
..................................................................................................................................................................................... [ 58%]
..................................................................................................................................................................................... [ 62%]
....................................................................................... [ 64%]
pygal/test/test_histogram.py .. [ 64%]
pygal/test/test_interpolate.py ...................................................................................................................................................... [ 67%]
..................................................................................................................................................................................... [ 71%]
..................................................................................................................................................................................... [ 75%]
..................................................................................................................................................................................... [ 80%]
..................................................................................................................................................................................... [ 84%]
..................................................................................................................................................................................... [ 88%]
..................................................................................................................................................................................... [ 92%]
..................................................................................................................................................................................... [ 96%]
....................... [ 96%]
pygal/test/test_line.py ........................ [ 97%]
pygal/test/test_pie.py ...... [ 97%]
pygal/test/test_serie_config.py ........ [ 97%]
pygal/test/test_sparktext.py .............. [ 98%]
pygal/test/test_stacked.py ........ [ 98%]
pygal/test/test_style.py .... [ 98%]
pygal/test/test_table.py .. [ 98%]
pygal/test/test_util.py ................ [ 98%]
pygal/test/test_view.py ................................................ [ 99%]
pygal/test/test_xml_filters.py .... [100%]
========================================================================================= FAILURES ==========================================================================================
________________________________________________________________________________ test_value_formatter[lxml] _________________________________________________________________________________
def test_value_formatter():
"""Test value formatter option"""
line = Line(value_formatter=lambda x: str(x) + u('‰'))
line.add('_', [10**4, 10**5, 23 * 10**4])
q = line.render_pyquery()
assert len(q(".y.axis .guides")) == 11
> assert q(".axis.y text").map(texts) == list(
map(
lambda x: str(x) + u('‰'), map(float, range(20000, 240000, 20000))
)
)
E AssertionError: assert ['20000.0â\x8...0000.0â\x80°'] == ['20000.0‰', ...0000.0‰', ...]
E At index 0 diff: '20000.0â\x80°' != '20000.0‰'
E Use -v to get more diff
pygal/test/test_config.py:245: AssertionError
________________________________________________________________________________ test_value_formatter[etree] ________________________________________________________________________________
def test_value_formatter():
"""Test value formatter option"""
line = Line(value_formatter=lambda x: str(x) + u('‰'))
line.add('_', [10**4, 10**5, 23 * 10**4])
q = line.render_pyquery()
assert len(q(".y.axis .guides")) == 11
> assert q(".axis.y text").map(texts) == list(
map(
lambda x: str(x) + u('‰'), map(float, range(20000, 240000, 20000))
)
)
E AssertionError: assert ['20000.0â\x8...0000.0â\x80°'] == ['20000.0‰', ...0000.0‰', ...]
E At index 0 diff: '20000.0â\x80°' != '20000.0‰'
E Use -v to get more diff
pygal/test/test_config.py:245: AssertionError
____________________________________________________________________________________ test_no_data[lxml] _____________________________________________________________________________________
def test_no_data():
"""Test no data and no data text option"""
line = Line()
q = line.render_pyquery()
assert q(".text-overlay text").text() == "No data"
line.no_data_text = u("þæ®þ怀&ij¿’€")
q = line.render_pyquery()
> assert q(".text-overlay text").text() == u("þæ®þ怀&ij¿’€")
E AssertionError: assert 'þæ®þæâ\...x80\x99â\x82¬' == 'þæ®þ怀&ij¿’€'
E - þæ®þ怀&ij¿’€
E + þæ®þæ��&ij¿��
pygal/test/test_config.py:306: AssertionError
____________________________________________________________________________________ test_no_data[etree] ____________________________________________________________________________________
def test_no_data():
"""Test no data and no data text option"""
line = Line()
q = line.render_pyquery()
assert q(".text-overlay text").text() == "No data"
line.no_data_text = u("þæ®þ怀&ij¿’€")
q = line.render_pyquery()
> assert q(".text-overlay text").text() == u("þæ®þ怀&ij¿’€")
E AssertionError: assert 'þæ®þæâ\...x80\x99â\x82¬' == 'þæ®þ怀&ij¿’€'
E - þæ®þ怀&ij¿’€
E + þæ®þæ��&ij¿��
pygal/test/test_config.py:306: AssertionError
_________________________________________________________________________________ test_formatters[lxml-Bar] _________________________________________________________________________________
Chart = <class 'pygal.graph.bar.Bar'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
_________________________________________________________________________________ test_formatters[lxml-Dot] _________________________________________________________________________________
Chart = <class 'pygal.graph.dot.Dot'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
_______________________________________________________________________________ test_formatters[lxml-Funnel] ________________________________________________________________________________
Chart = <class 'pygal.graph.funnel.Funnel'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
________________________________________________________________________________ test_formatters[lxml-Gauge] ________________________________________________________________________________
Chart = <class 'pygal.graph.gauge.Gauge'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
____________________________________________________________________________ test_formatters[lxml-HorizontalBar] ____________________________________________________________________________
Chart = <class 'pygal.graph.horizontalbar.HorizontalBar'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
___________________________________________________________________________ test_formatters[lxml-HorizontalLine] ____________________________________________________________________________
Chart = <class 'pygal.graph.horizontalline.HorizontalLine'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
________________________________________________________________________ test_formatters[lxml-HorizontalStackedBar] _________________________________________________________________________
Chart = <class 'pygal.graph.horizontalstackedbar.HorizontalStackedBar'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
________________________________________________________________________ test_formatters[lxml-HorizontalStackedLine] ________________________________________________________________________
Chart = <class 'pygal.graph.horizontalstackedline.HorizontalStackedLine'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
________________________________________________________________________________ test_formatters[lxml-Line] _________________________________________________________________________________
Chart = <class 'pygal.graph.line.Line'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
_________________________________________________________________________________ test_formatters[lxml-Pie] _________________________________________________________________________________
Chart = <class 'pygal.graph.pie.Pie'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'15â\x82¬', ...5â\x82¬', ...} == {'15€', '1_a$...€', '5€', ...}
E Extra items in the left set:
E '4â\x82¬'
E '15â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:...
E
E ...Full output truncated (6 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
_______________________________________________________________________________ test_formatters[lxml-Pyramid] _______________________________________________________________________________
Chart = <class 'pygal.graph.pyramid.Pyramid'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
___________________________________________________________________________ test_formatters[lxml-VerticalPyramid] ___________________________________________________________________________
Chart = <class 'pygal.graph.pyramid.VerticalPyramid'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
________________________________________________________________________________ test_formatters[lxml-Radar] ________________________________________________________________________________
Chart = <class 'pygal.graph.radar.Radar'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
_____________________________________________________________________________ test_formatters[lxml-SolidGauge] ______________________________________________________________________________
Chart = <class 'pygal.graph.solidgauge.SolidGauge'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'15â\x82¬', ...5â\x82¬', ...} == {'15€', '1_a$...€', '5€', ...}
E Extra items in the left set:
E '4â\x82¬'
E '15â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:...
E
E ...Full output truncated (6 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
_____________________________________________________________________________ test_formatters[lxml-StackedBar] ______________________________________________________________________________
Chart = <class 'pygal.graph.stackedbar.StackedBar'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
_____________________________________________________________________________ test_formatters[lxml-StackedLine] _____________________________________________________________________________
Chart = <class 'pygal.graph.stackedline.StackedLine'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
_______________________________________________________________________________ test_formatters[lxml-Treemap] _______________________________________________________________________________
Chart = <class 'pygal.graph.treemap.Treemap'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
________________________________________________________________________________ test_formatters[etree-Bar] _________________________________________________________________________________
Chart = <class 'pygal.graph.bar.Bar'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
________________________________________________________________________________ test_formatters[etree-Dot] _________________________________________________________________________________
Chart = <class 'pygal.graph.dot.Dot'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
_______________________________________________________________________________ test_formatters[etree-Funnel] _______________________________________________________________________________
Chart = <class 'pygal.graph.funnel.Funnel'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
_______________________________________________________________________________ test_formatters[etree-Gauge] ________________________________________________________________________________
Chart = <class 'pygal.graph.gauge.Gauge'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
___________________________________________________________________________ test_formatters[etree-HorizontalBar] ____________________________________________________________________________
Chart = <class 'pygal.graph.horizontalbar.HorizontalBar'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
___________________________________________________________________________ test_formatters[etree-HorizontalLine] ___________________________________________________________________________
Chart = <class 'pygal.graph.horizontalline.HorizontalLine'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
________________________________________________________________________ test_formatters[etree-HorizontalStackedBar] ________________________________________________________________________
Chart = <class 'pygal.graph.horizontalstackedbar.HorizontalStackedBar'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
_______________________________________________________________________ test_formatters[etree-HorizontalStackedLine] ________________________________________________________________________
Chart = <class 'pygal.graph.horizontalstackedline.HorizontalStackedLine'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
________________________________________________________________________________ test_formatters[etree-Line] ________________________________________________________________________________
Chart = <class 'pygal.graph.line.Line'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
________________________________________________________________________________ test_formatters[etree-Pie] _________________________________________________________________________________
Chart = <class 'pygal.graph.pie.Pie'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'15â\x82¬', ...5â\x82¬', ...} == {'15€', '1_a$...€', '5€', ...}
E Extra items in the left set:
E '4â\x82¬'
E '15â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:...
E
E ...Full output truncated (6 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
______________________________________________________________________________ test_formatters[etree-Pyramid] _______________________________________________________________________________
Chart = <class 'pygal.graph.pyramid.Pyramid'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
__________________________________________________________________________ test_formatters[etree-VerticalPyramid] ___________________________________________________________________________
Chart = <class 'pygal.graph.pyramid.VerticalPyramid'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
_______________________________________________________________________________ test_formatters[etree-Radar] ________________________________________________________________________________
Chart = <class 'pygal.graph.radar.Radar'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
_____________________________________________________________________________ test_formatters[etree-SolidGauge] _____________________________________________________________________________
Chart = <class 'pygal.graph.solidgauge.SolidGauge'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'15â\x82¬', ...5â\x82¬', ...} == {'15€', '1_a$...€', '5€', ...}
E Extra items in the left set:
E '4â\x82¬'
E '15â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:...
E
E ...Full output truncated (6 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
_____________________________________________________________________________ test_formatters[etree-StackedBar] _____________________________________________________________________________
Chart = <class 'pygal.graph.stackedbar.StackedBar'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
____________________________________________________________________________ test_formatters[etree-StackedLine] _____________________________________________________________________________
Chart = <class 'pygal.graph.stackedline.StackedLine'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
______________________________________________________________________________ test_formatters[etree-Treemap] _______________________________________________________________________________
Chart = <class 'pygal.graph.treemap.Treemap'>
def test_formatters(Chart):
"""Test custom formatters"""
if Chart._dual or Chart == Box:
return
chart = Chart(formatter=lambda x, chart, serie: '%s%s$' % (x, serie.title))
chart.add('_a', [1, 2, {'value': 3, 'formatter': lambda x: u('%s¥') % x}])
chart.add('_b', [4, 5, 6], formatter=lambda x: u('%s€') % x)
chart.x_labels = [2, 4, 6]
chart.x_labels_major = [4]
q = chart.render_pyquery()
> assert set(
[v.text for v in q(".value")]
) == set((u('4€'), u('5€'), u('6€'), '1_a$', '2_a$', u('3¥')) +
(('6_a$', u('15€')) if Chart in (Pie, SolidGauge) else ()))
E AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
E Extra items in the left set:
E '4â\x82¬'
E '6â\x82¬'
E '3Â¥'
E '5â\x82¬'
E Extra items in the right set:
E '6€'...
E
E ...Full output truncated (4 lines hidden), use '-vv' to show
pygal/test/test_config.py:551: AssertionError
================================================================================== short test summary info ==================================================================================
FAILED pygal/test/test_config.py::test_value_formatter[lxml] - AssertionError: assert ['20000.0â\x8...0000.0â\x80°'] == ['20000.0‰', ...0000.0‰', ...]
FAILED pygal/test/test_config.py::test_value_formatter[etree] - AssertionError: assert ['20000.0â\x8...0000.0â\x80°'] == ['20000.0‰', ...0000.0‰', ...]
FAILED pygal/test/test_config.py::test_no_data[lxml] - AssertionError: assert 'þæ®þæâ\...x80\x99â\x82¬' == 'þæ®þ怀&ij¿’€'
FAILED pygal/test/test_config.py::test_no_data[etree] - AssertionError: assert 'þæ®þæâ\...x80\x99â\x82¬' == 'þæ®þ怀&ij¿’€'
FAILED pygal/test/test_config.py::test_formatters[lxml-Bar] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[lxml-Dot] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[lxml-Funnel] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[lxml-Gauge] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[lxml-HorizontalBar] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[lxml-HorizontalLine] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[lxml-HorizontalStackedBar] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[lxml-HorizontalStackedLine] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[lxml-Line] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[lxml-Pie] - AssertionError: assert {'15â\x82¬', ...5â\x82¬', ...} == {'15€', '1_a$...€', '5€', ...}
FAILED pygal/test/test_config.py::test_formatters[lxml-Pyramid] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[lxml-VerticalPyramid] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[lxml-Radar] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[lxml-SolidGauge] - AssertionError: assert {'15â\x82¬', ...5â\x82¬', ...} == {'15€', '1_a$...€', '5€', ...}
FAILED pygal/test/test_config.py::test_formatters[lxml-StackedBar] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[lxml-StackedLine] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[lxml-Treemap] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[etree-Bar] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[etree-Dot] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[etree-Funnel] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[etree-Gauge] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[etree-HorizontalBar] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[etree-HorizontalLine] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[etree-HorizontalStackedBar] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[etree-HorizontalStackedLine] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[etree-Line] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[etree-Pie] - AssertionError: assert {'15â\x82¬', ...5â\x82¬', ...} == {'15€', '1_a$...€', '5€', ...}
FAILED pygal/test/test_config.py::test_formatters[etree-Pyramid] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[etree-VerticalPyramid] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[etree-Radar] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[etree-SolidGauge] - AssertionError: assert {'15â\x82¬', ...5â\x82¬', ...} == {'15€', '1_a$...€', '5€', ...}
FAILED pygal/test/test_config.py::test_formatters[etree-StackedBar] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[etree-StackedLine] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
FAILED pygal/test/test_config.py::test_formatters[etree-Treemap] - AssertionError: assert {'1_a$', '2_a...¬', '6â\x82¬'} == {'1_a$', '2_a...', '5€', '6€'}
======================================================================== 38 failed, 4376 passed in 70.38s (0:01:10) =========================================================================
from pygal.
Related Issues (20)
- can't multiply sequence by non-int of type 'float' when using label_font_size in custom style
- render_data_uri fails with TypeError: a bytes-like object is required, not 'str' HOT 1
- (C) sign in copyright notice leads to crash on Japanese Windows.
- Modify Tooltips
- i want show quarters in first row and years in second row
- 3.0.0: `pygal` uses deprecated `pkg_resources` HOT 4
- show_y_guides=False doesn't work when rendering to an svg string (as opposed to a file) HOT 1
- Please add support for Markmap syntax export for MindMaps
- Please add support for generating DOT graph description language markup and flowcharts in svg
- Please add the ability to include the hatching/stroke_style used for a particular data series in the legend
- Possible to reduce the spacing between plot title and plot?
- Plot x guides only for non None x_labels
- Font size cannot change in my picture
- 3.0.1 switched to a deprecated `importlib.metadata` API that's removed in Python 3.12 HOT 7
- RFE: is it possible to restart making github releases?🤔
- invalid stylesheet in svg HOT 3
- Update optional requirements tinycss and cssselect to tinycss2 and cssselect2
- 'fill' doesn't work properly with 'allow_interruptions'
- When embedding SVGs duplicate IDs trip up the html validator HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygal.