Skip to content

Commit

Permalink
add try/except
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuang11 committed Oct 26, 2024
1 parent 72cd7b9 commit 49c59f1
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lumen/tests/ai/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@

from panel.chat import ChatMessage

from lumen.ai.assistant import Assistant
from lumen.ai.export import (
LumenOutput, export_notebook, format_markdown, format_output,
make_preamble,
)
from lumen.pipeline import Pipeline
from lumen.sources.intake import IntakeSource
from lumen.views import Table

loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)

try:
from lumen.ai.assistant import Assistant
from lumen.ai.export import (
LumenOutput, export_notebook, format_markdown, format_output,
make_preamble,
)
except ImportError:
pytest.skip("Skipping tests that require lumen.ai", allow_module_level=True)


@pytest.fixture
def source():
Expand Down

0 comments on commit 49c59f1

Please sign in to comment.