Skip to content

Commit

Permalink
try windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuang11 committed Oct 28, 2024
1 parent 49c59f1 commit 8589c90
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lumen/tests/ai/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,13 @@ def test_format_output_pipeline(source):

cells = format_output(msg)
cells[0].pop("id")

uri = source.uri
if os.name == "nt":
uri = uri.replace("\\", "\\\\")
expected_source = (
f"pipeline = lm.Pipeline.from_spec({{\n"
f' "source": {{\n'
f' "uri": "{source.uri}",\n'
f' "uri": "{uri}",\n'
f' "type": "intake"\n'
f" }},\n"
f' "table": "test"\n'
Expand All @@ -156,6 +158,9 @@ def test_format_output_view(source):

cells = format_output(msg)
cells[0].pop("id")
uri = source.uri
if os.name == "nt":
uri = uri.replace("\\", "\\\\")
assert cells == [
{
"cell_type": "code",
Expand All @@ -165,7 +170,7 @@ def test_format_output_view(source):
"source": "view = lm.View.from_spec({\n"
' "pipeline": {\n'
' "source": {\n'
f' "uri": "{source.uri}",\n'
f' "uri": "{uri}",\n'
' "type": "intake"\n'
" },\n"
' "table": "test"\n'
Expand Down

0 comments on commit 8589c90

Please sign in to comment.