22import shutil
33import sqlite3
44import subprocess
5+ import sys
56from pathlib import Path
67from tempfile import TemporaryDirectory
78
@@ -39,13 +40,16 @@ def test_kaitak_ags3_notebook_runs_and_creates_gpkg(examples_dir):
3940 # TODO: implement logging
4041 # NOTE: The env (environment variables) and encoding are required for running
4142 # the notebook as a script from both Windows and Linux. Without => UnicodeDecodeError
42- # NOTE: `uvx uv run` runs the marimo notebook as a script in a temporary environment,
43+ # NOTE: `( uvx) uv run` runs the marimo notebook as a script in a temporary environment,
4344 # with the Python version and dependencies specified in the PEP 723 inline script metadata.
45+ # The issue with this approach is that it uses the latest version of bedrock-ge,
46+ # rather than the current code in this repo.
4447 env = os .environ .copy ()
4548 env ["PYTHONIOENCODING" ] = "utf-8"
4649 result = subprocess .run (
4750 # ["uvx", "uv", "run", "--no-project", "--no-cache", str(notebook_path)],
48- ["uv" , "run" , str (notebook_path )],
51+ # ["uv", "run", str(notebook_path)],
52+ [sys .executable , str (notebook_path )],
4953 check = False ,
5054 capture_output = True ,
5155 text = True ,
@@ -55,7 +59,7 @@ def test_kaitak_ags3_notebook_runs_and_creates_gpkg(examples_dir):
5559
5660 # Check that the script ran successfully
5761 assert result .returncode == 0 , (
58- f"📛 Running `uvx run marimo notebook.py` failed with code { result .returncode } \n "
62+ f"📛 Running `python notebook.py` failed with code { result .returncode } \n "
5963 f"📄 STDOUT:\n { result .stdout } \n "
6064 f"⚠️ STDERR:\n { result .stderr } "
6165 )
0 commit comments