Skip to content
Snippets Groups Projects
Commit 773e5565 authored by Cyril Moineau's avatar Cyril Moineau
Browse files

Improve example script test to show stdout in failing cases.

parent 626a07fe
No related branches found
No related tags found
2 merge requests!490.3.1,!32[Feat] Add quantized exports for Resnet18 and LeNet
Pipeline #72868 passed
......@@ -9,8 +9,10 @@ EXAMPLES_DIR = CURRENT_DIR / "../../examples"
# Dictionary of test cases: {id: (script_name, script_args)}
TEST_CASES = {
"lenet-int8-no-args": ("export_LeNet/lenet.py", []),
"resnet18-int8-no-args": ("export_ResNet18/resnet18.py", ["--mock_db"])
"lenet-no-args": ("export_LeNet/lenet.py", []),
"lenet-int8": ("export_LeNet/lenet.py", ["--dtype=int8"]),
"resnet18-no-args": ("export_ResNet18/resnet18.py", ["--mock_db"]),
"resnet18-int8": ("export_ResNet18/resnet18.py", ["--mock_db", "--dtype=int8"])
}
def generate_test_cases():
......@@ -30,7 +32,7 @@ def test_example_scripts_run_without_error(script_name, script_args):
capture_output=True,
text=True
)
assert result.returncode == 0, f"{script_name} failed with error: {result.stderr}"
assert result.returncode == 0, f"{script_name} failed with error:\n{result.stderr}\n\nTraceback:\n{result.stdout}"
def main():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment