Skip to content

Commit

Permalink
fix: solara test does not take arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbreddels committed Feb 19, 2024
1 parent 03cbc90 commit b500a53
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/ui/module_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,17 @@ def kernel_code():

def test_threejs_fiber(ipywidgets_runner, page_session: playwright.sync_api.Page, assert_solara_snapshot):
bundle_path = HERE.parent.parent / "examples/threejs-fiber/threejs-fiber.bundle.js"
bundle_path_copy = bundle_path

def kernel_code(bundle_path):
def kernel_code(bundle_path=None):
from pathlib import Path

import ipyreact

if bundle_path is None:
# this only happens in solara
bundle_path = str(bundle_path_copy) # type: ignore

ipyreact.define_module("threejs-fiber", Path(bundle_path))
# import ipyreact.importmap

Expand Down

0 comments on commit b500a53

Please sign in to comment.