]> git.ipfire.org Git - thirdparty/fastapi/sqlmodel.git/commitdiff
♻️ Update `tests/test_select_gen.py`, pass environment variables, needed for NixOS...
authorPeder Bergebakken Sundt <pbsds@hotmail.com>
Sun, 27 Apr 2025 11:31:49 +0000 (13:31 +0200)
committerGitHub <noreply@github.com>
Sun, 27 Apr 2025 11:31:49 +0000 (11:31 +0000)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
tests/test_select_gen.py

index 6d578f7708ed88cf20cb7c6704014defc019b11e..e14200d513d16c0d3a5ab07fe14938e19172d2a2 100644 (file)
@@ -1,3 +1,4 @@
+import os
 import subprocess
 import sys
 from pathlib import Path
@@ -9,9 +10,11 @@ root_path = Path(__file__).parent.parent
 
 @needs_py39
 def test_select_gen() -> None:
+    env = os.environ.copy()
+    env["CHECK_JINJA"] = "1"
     result = subprocess.run(
         [sys.executable, "scripts/generate_select.py"],
-        env={"CHECK_JINJA": "1"},
+        env=env,
         check=True,
         cwd=root_path,
         capture_output=True,