Skip to content

Commit

Permalink
Fix imports in test_types
Browse files Browse the repository at this point in the history
  • Loading branch information
antonymilne committed Nov 23, 2023
1 parent 452657e commit 941eb8a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vizro-core/tests/unit/vizro/models/test_types.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import importlib
from pathlib import Path

import plotly.express as plotly_express
import plotly.graph_objects as go
import pytest
Expand Down Expand Up @@ -145,7 +148,7 @@ def invalid_decorated_graph_function():

class Model(VizroBaseModel):
# The import_path here makes it possible to import the above function using getattr(import_path, _target_).
function: CapturedCallable = Field(..., import_path=__import__(__name__))
function: CapturedCallable = Field(..., import_path=importlib.import_module(__name__))


class TestModelFieldPython:
Expand Down

0 comments on commit 941eb8a

Please sign in to comment.