From 235295fe1b1a093b669c2e04763661e8689f5084 Mon Sep 17 00:00:00 2001 From: Andrew Huang Date: Mon, 28 Oct 2024 07:39:45 -0700 Subject: [PATCH] try windows --- lumen/tests/ai/test_export.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lumen/tests/ai/test_export.py b/lumen/tests/ai/test_export.py index a0ad09a33..ec91f9364 100644 --- a/lumen/tests/ai/test_export.py +++ b/lumen/tests/ai/test_export.py @@ -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' @@ -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", @@ -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'