diff options
Diffstat (limited to 'packages/meshbay-hub/tests/test_season_panel_placement.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_season_panel_placement.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/meshbay-hub/tests/test_season_panel_placement.py b/packages/meshbay-hub/tests/test_season_panel_placement.py index 8c04ea7..6e5f78b 100644 --- a/packages/meshbay-hub/tests/test_season_panel_placement.py +++ b/packages/meshbay-hub/tests/test_season_panel_placement.py @@ -43,7 +43,7 @@ BLOCK = re.compile( @pytest.fixture(scope="module") def source(): - m = BLOCK.search(APP.read_text()) + m = BLOCK.search(APP.read_text(encoding="utf-8")) assert m, ("placeSeasonPanel is no longer where this test reads it from — " "the season menu's placement is untested until this is fixed") return m.group(0) @@ -58,8 +58,8 @@ def _place(tmp_path, source, *, top, bottom, left=40, width=300, inner_height=74 const el = {{ getBoundingClientRect: () => ({{ top: {top}, bottom: {bottom}, left: {left}, width: {width} }}) }}; console.log(JSON.stringify(placeSeasonPanel(el))); - """) - proc = subprocess.run(["node", str(script)], capture_output=True, text=True) + """, encoding="utf-8") + proc = subprocess.run(["node", str(script)], capture_output=True, text=True, encoding="utf-8") assert proc.returncode == 0, proc.stderr return json.loads(proc.stdout) @@ -157,7 +157,7 @@ def test_no_element_means_no_position(tmp_path, source): globalThis.window = {{ innerHeight: 740 }}; {source} console.log(JSON.stringify(placeSeasonPanel(null))); - """) - proc = subprocess.run(["node", str(script)], capture_output=True, text=True) + """, encoding="utf-8") + proc = subprocess.run(["node", str(script)], capture_output=True, text=True, encoding="utf-8") assert proc.returncode == 0, proc.stderr assert json.loads(proc.stdout) is None |