Skip to content

Commit 48ecf9d

Browse files
committed
potentially fix flaky tests (specifically on github)
1 parent 64d2f37 commit 48ecf9d

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

tests/test_reactjs/test_modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ async def test_nest_custom_component_under_web_component(display: DisplayFixture
103103
be nested under web components.
104104
"""
105105
Container = reactpy.reactjs.component_from_file(
106-
JS_FIXTURES_DIR / "nest-custom-under-web.js", "Container", name="nest-custom-under-web"
106+
JS_FIXTURES_DIR / "nest-custom-under-web.js", "Container"
107107
)
108108

109109
@reactpy.component

tests/test_web/test_module.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
THESE ARE TESTS FOR THE LEGACY API. SEE tests/test_reactjs/* FOR THE NEW API TESTS.
33
THE CONTENTS OF THIS MODULE WILL BE MIGRATED OR DELETED ONCE THE LEGACY API IS REMOVED.
44
"""
5+
56
from pathlib import Path
67

78
import pytest

tests/test_widgets.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from base64 import b64encode
22
from pathlib import Path
33

4+
import pytest
5+
46
import reactpy
5-
from reactpy.testing import DisplayFixture, poll
7+
from reactpy.testing import GITHUB_ACTIONS, DisplayFixture, poll
68
from tests.tooling.common import DEFAULT_TYPE_DELAY
79

810
HERE = Path(__file__).parent
@@ -108,6 +110,7 @@ def SomeComponent():
108110
await poll_value.until_equals(12)
109111

110112

113+
@pytest.mark.flaky(reruns=10 if GITHUB_ACTIONS else 1)
111114
async def test_use_linked_inputs_ignore_empty(display: DisplayFixture):
112115
value = reactpy.Ref(None)
113116

0 commit comments

Comments
 (0)