From 5676c7e7c4faf843558536f9e9b9b54bdf3faa24 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Tue, 31 Oct 2017 16:24:36 -0400 Subject: [PATCH] Fix: pytest.fail not fails Signed-off-by: Jonathan Rajotte --- .../test_modules_abi_vs_tools.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lttng_ivc/tests/modules_abi_vs_tools/test_modules_abi_vs_tools.py b/lttng_ivc/tests/modules_abi_vs_tools/test_modules_abi_vs_tools.py index 32a25e2..8332dc5 100644 --- a/lttng_ivc/tests/modules_abi_vs_tools/test_modules_abi_vs_tools.py +++ b/lttng_ivc/tests/modules_abi_vs_tools/test_modules_abi_vs_tools.py @@ -191,7 +191,7 @@ def test_modules_base_tracing(tmpdir, modules_label, tools_label): sessiond = runtime.subprocess_terminate(sessiond) if sessiond.returncode != 0: - pytest.fails("Return value of sessiond is not zero") + pytest.fail("Return value of sessiond is not zero") return cp_process, cp_out, cp_err = runtime.run(babeltrace_cmd) @@ -250,7 +250,7 @@ def test_modules_regen_metadata(tmpdir, modules_label, tools_label, command, sce # Make sure everything looks good on this side sessiond = runtime.subprocess_terminate(sessiond) if sessiond.returncode != 0: - pytest.fails("Return value of sessiond is not zero") + pytest.fail("Return value of sessiond is not zero") return runtime.run("lttng {}".format(command)) @@ -259,7 +259,7 @@ def test_modules_regen_metadata(tmpdir, modules_label, tools_label, command, sce sessiond = runtime.subprocess_terminate(sessiond) if sessiond.returncode != 0: - pytest.fails("Return value of sessiond is not zero") + pytest.fail("Return value of sessiond is not zero") cp_process, cp_out, cp_err = runtime.run(babeltrace_cmd) assert(line_count(cp_out) == nb_events) @@ -310,7 +310,7 @@ def test_modules_statedump(tmpdir, modules_label, tools_label, scenario): sessiond = runtime.subprocess_terminate(sessiond) if sessiond.returncode != 0: - pytest.fails("Return value of sessiond is not zero") + pytest.fail("Return value of sessiond is not zero") cp_process, cp_out, cp_err = runtime.run(babeltrace_cmd) assert(line_count(cp_out) == expected_event) @@ -350,7 +350,7 @@ def test_modules_starglobing_enabler(tmpdir, modules_label, tools_label, scenari runtime.run("lttng enable-event -k 'lttng_test_*_even*'") sessiond = runtime.subprocess_terminate(sessiond) if sessiond.returncode != 0: - pytest.fails("Return value of sessiond is not zero") + pytest.fail("Return value of sessiond is not zero") return runtime.run("lttng enable-event -k 'lttng_test_*_even*'") @@ -365,7 +365,7 @@ def test_modules_starglobing_enabler(tmpdir, modules_label, tools_label, scenari sessiond = runtime.subprocess_terminate(sessiond) if sessiond.returncode != 0: - pytest.fails("Return value of sessiond is not zero") + pytest.fail("Return value of sessiond is not zero") cp_process, cp_out, cp_err = runtime.run(babeltrace_cmd) assert(line_count(cp_out) == expected_events) -- 2.34.1