Skip to content

Commit d0d1cb6

Browse files
mgornyCarreau
authored andcommitted
Replace @flaky.flaky decorate with pytest marker
Use the `@pytest.mark.flaky` marker in place of the `@flaky.flaky` decorator, to modernize the code and improve compatibility with other plugins providing the feature such as `pytest-rerunfailures`. Signed-off-by: Michał Górny <mgorny@gentoo.org>
1 parent 705180c commit d0d1cb6

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

tests/exporters/test_qtpng.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import os
77

88
import pytest
9-
from flaky import flaky
109

1110
from nbconvert.exporters.qt_screenshot import QT_INSTALLED
1211
from nbconvert.exporters.qtpng import QtPNGExporter
@@ -20,7 +19,7 @@ class TestQtPNGExporter(ExportersTestsBase):
2019

2120
exporter_class = QtPNGExporter # type:ignore
2221

23-
@flaky
22+
@pytest.mark.flaky()
2423
def test_export(self):
2524
"""
2625
Can a TemplateExporter export something?

tests/test_nbconvertapp.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import nbformat
1010
import pytest
11-
from flaky import flaky # type:ignore
1211
from traitlets.tests.utils import check_help_all_output
1312

1413
from nbconvert.exporters import HTMLExporter
@@ -150,7 +149,7 @@ def test_filename_spaces(self):
150149
)
151150
assert os.path.isfile("notebook with spaces.pdf")
152151

153-
@flaky
152+
@pytest.mark.flaky()
154153
@pytest.mark.network()
155154
@pytest.mark.skipif(not PLAYWRIGHT_INSTALLED, reason="Playwright not installed")
156155
def test_webpdf_with_chromium(self):

0 commit comments

Comments
 (0)