Skip to content

Commit

Permalink
test: skip koalas test if not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
percevalw committed Dec 4, 2023
1 parent 8c286c7 commit b8fd59c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from datetime import datetime

import pandas as pd
import pytest
import spacy
from pytest import fixture

Expand Down Expand Up @@ -151,7 +152,6 @@ def df_notes():


def make_df_note(text, module):
import databricks.koalas # noqa F401
from pyspark.sql import types as T
from pyspark.sql.session import SparkSession

Expand Down Expand Up @@ -180,6 +180,10 @@ def make_df_note(text, module):
return notes

if module == "koalas":
try:
import databricks.koalas # noqa F401
except ImportError:
pytest.skip("Koalas not installed")
return notes.to_koalas()


Expand Down

0 comments on commit b8fd59c

Please sign in to comment.