diff --git a/tests/e2e/standard/test_files.py b/tests/e2e/standard/test_files.py index adf8f6243..718f59c69 100644 --- a/tests/e2e/standard/test_files.py +++ b/tests/e2e/standard/test_files.py @@ -501,6 +501,14 @@ def test_pil_image(self, container: MetadataContainer): def test_matplotlib_figure(self, container: MetadataContainer): figure = generate_matplotlib_figure() container["matplotlib_figure"] = figure + + @pytest.mark.skip( + reason="Conversion to html fails for matplotlib axes with polar projection. " + "The test without cdn passes because matplotlib figure is converted to an image." + ) + @pytest.mark.parametrize("container", ["run"], indirect=True) + def test_matplotlib_figure_cdn(self, container: MetadataContainer): + figure = generate_matplotlib_figure() container["matplotlib_figure_cdn"] = File.as_html(figure, include_plotlyjs="cdn") @pytest.mark.parametrize("container", ["run"], indirect=True) diff --git a/tests/unit/neptune/new/internal/utils/test_images.py b/tests/unit/neptune/new/internal/utils/test_images.py index f1229056d..90cb40609 100644 --- a/tests/unit/neptune/new/internal/utils/test_images.py +++ b/tests/unit/neptune/new/internal/utils/test_images.py @@ -27,6 +27,7 @@ import numpy import pandas import plotly.express as px +import pytest import seaborn as sns from bokeh.plotting import figure from matplotlib import pyplot @@ -188,6 +189,18 @@ def test_get_html_from_matplotlib_figure(self): # then self.assertTrue(result.startswith('\n')) + @pytest.mark.skip(reason="Conversion to html fails for matplotlib axes with polar projection") + def test_get_html_from_matplotlib_figure_polar(self): + fig = pyplot.figure() + rect = 0.1, 0.1, 0.8, 0.8 + fig.add_axes(rect, polar=True) + + # when + result = get_html_content(fig) + + # then + self.assertTrue(result.startswith('\n')) + def test_get_html_from_plotly(self): # given df = px.data.tips() @@ -232,7 +245,7 @@ def test_get_html_from_altair(self): result = get_html_content(chart) # then - self.assertTrue(result.startswith("\n\n\n