diff --git a/tardis/tests/tests_slow/conftest.py b/tardis/tests/tests_slow/conftest.py index cc9e84bdd55..5f1f9f708e0 100644 --- a/tardis/tests/tests_slow/conftest.py +++ b/tardis/tests/tests_slow/conftest.py @@ -54,9 +54,7 @@ def pytest_runtest_makereport(item, call): @pytest.fixture(scope="function") def plot_object(request): - plot_obj = PlotUploader(request) - setattr(request.node, "plot_obj", plot_obj) - return plot_obj + return PlotUploader(request) @pytest.fixture(scope="session") diff --git a/tardis/tests/tests_slow/plot_helpers.py b/tardis/tests/tests_slow/plot_helpers.py index f6588a59a68..f7f9670f04a 100644 --- a/tardis/tests/tests_slow/plot_helpers.py +++ b/tardis/tests/tests_slow/plot_helpers.py @@ -4,6 +4,15 @@ import tardis +thumbnail_html = """ +
+ + + +
+""" + + class PlotUploader(object): def __init__(self, request): self.request = request @@ -39,15 +48,13 @@ def upload(self, report): plot_file.name ) - thumbnail_html = """ -
- - - -
- """.format(self.dokuwiki_url, tardis.__githash__[0:7], name) - - self.plot_html.append(extras.html(thumbnail_html)) + self.plot_html.append(extras.html( + thumbnail_html.format( + dokuwiki_url=self.dokuwiki_url, + githash=tardis.__githash__[0:7], + name=name) + ) + ) plot_file.close() def get_extras(self):