Skip to content

Commit cff5e09

Browse files
committed
tests: Suppress cargo-component output
Suppress the output from cargo-component when we first run it to check if it's available, otherwise you may see the following $ pytest test/test_wasm-wasi-component.py which: no go in (/home/andrew/.local/bin:/home/andrew/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin) error: no such command: `component` View all installed commands with `cargo --list` Find a package to install `component` with `cargo search cargo-component Note: This didn't stop the tests from working, just an aesthetic issue. Closes: #1410 Signed-off-by: Andrew Clayton <[email protected]>
1 parent 6976a61 commit cff5e09

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: test/unit/applications/lang/wasm_component.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ class ApplicationWasmComponent(ApplicationProto):
1111
@staticmethod
1212
def prepare_env(script):
1313
try:
14-
subprocess.check_output(['cargo', 'component', '--help'])
14+
subprocess.check_output(
15+
['cargo', 'component', '--help'],
16+
stderr=subprocess.STDOUT,
17+
)
1518
except (subprocess.CalledProcessError, FileNotFoundError):
1619
return None
1720

0 commit comments

Comments
 (0)