Skip to content

Commit 8967f6e

Browse files
authored
update python tests to use componentize-py template (#2275)
* update pyton tests to use componentize-py template Signed-off-by: karthik2804 <[email protected]> --------- Signed-off-by: karthik2804 <[email protected]>
1 parent 6a3cbe1 commit 8967f6e

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

tests/integration.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,14 +415,24 @@ Caused by:
415415

416416
#[test]
417417
#[cfg(feature = "extern-dependencies-tests")]
418-
// Ignore until https://github.com/fermyon/spin-python-sdk/pull/65 is merged
418+
// TODO: Check why python is not picking up the spin_sdk from site_packages
419+
// Currently installing to the local directory to get around it.
419420
fn http_python_template_smoke_test() -> anyhow::Result<()> {
421+
let prebuild = |env: &mut testing_framework::TestEnvironment<_>| {
422+
let mut tidy = std::process::Command::new("pip3");
423+
tidy.args(["install", "-r", "requirements.txt", "-t", "."]);
424+
env.run_in(&mut tidy)?;
425+
let mut tidy = std::process::Command::new("pip3");
426+
tidy.args(["install", "componentize-py"]);
427+
env.run_in(&mut tidy)?;
428+
Ok(())
429+
};
420430
http_smoke_test_template(
421431
"http-py",
422432
Some("https://github.com/fermyon/spin-python-sdk"),
423-
&["py2wasm"],
424-
|_| Ok(()),
425-
"Hello from the Python SDK",
433+
&[],
434+
prebuild,
435+
"Hello from Python!",
426436
)
427437
}
428438

0 commit comments

Comments
 (0)