From ff8e502504b83b75635c4c22fd2436079bdd0826 Mon Sep 17 00:00:00 2001 From: fansi Date: Mon, 16 May 2022 14:57:19 +0800 Subject: [PATCH] split python test case Signed-off-by: fansi --- examples/pytest-demo/fail_test.py | 5 +++++ examples/pytest-demo/{num_test.py => pass_test.py} | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 examples/pytest-demo/fail_test.py rename examples/pytest-demo/{num_test.py => pass_test.py} (70%) diff --git a/examples/pytest-demo/fail_test.py b/examples/pytest-demo/fail_test.py new file mode 100644 index 000000000..dc494b1a7 --- /dev/null +++ b/examples/pytest-demo/fail_test.py @@ -0,0 +1,5 @@ +def square(x): + return x * x + +def test_the_square_of_negative_5_is_negative_25(): + assert square(-5) == -25 diff --git a/examples/pytest-demo/num_test.py b/examples/pytest-demo/pass_test.py similarity index 70% rename from examples/pytest-demo/num_test.py rename to examples/pytest-demo/pass_test.py index 30d8afe44..64f0271c0 100644 --- a/examples/pytest-demo/num_test.py +++ b/examples/pytest-demo/pass_test.py @@ -9,6 +9,3 @@ def square(x): def test_the_square_of_5_is_25(): assert square(5) == 25 - -# def test_the_square_of_negative_5_is_negative_25(): -# assert square(-5) == -25 -- Gitee