Skip to content

Commit d6f1232

Browse files
committed
test: add uv build integration test
1 parent fbd4d1c commit d6f1232

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/integration/buildcmd/test_build_cmd_python.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import os
23
import pathlib
34
from typing import Set
45
from unittest import skipIf
@@ -621,3 +622,22 @@ def test_unsupported_runtime(self):
621622
self.assertEqual(1, process_execute.process.returncode)
622623

623624
self.assertIn("Build Failed", str(process_execute.stdout))
625+
626+
627+
class TestBuildCommand_PythonUv(BuildIntegBase):
628+
def test_build_python_with_uv_experimental_flag(self):
629+
# Set experimental flag
630+
os.environ["SAM_CLI_BETA_UV_PACKAGE_MANAGER"] = "true"
631+
632+
try:
633+
overrides = {"Runtime": "python3.11", "CodeUri": "Python"}
634+
cmdlist = self.get_command_list(parameter_overrides=overrides)
635+
636+
command_result = run_command(cmdlist, cwd=self.working_dir)
637+
638+
# Verify build succeeded
639+
self.assertEqual(command_result.process.returncode, 0)
640+
641+
finally:
642+
# Clean up environment
643+
os.environ.pop("SAM_CLI_BETA_UV_PACKAGE_MANAGER", None)

0 commit comments

Comments
 (0)