From ce87061514aff4907b2efc64ed6ad2a31fbca7b8 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Sat, 13 Sep 2025 02:13:42 +0200 Subject: [PATCH 1/4] do the thing --- app/test_calculator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/test_calculator.py b/app/test_calculator.py index f564193..effe6ac 100644 --- a/app/test_calculator.py +++ b/app/test_calculator.py @@ -1,3 +1,5 @@ +import random + from .calculator import Calculator @@ -24,6 +26,8 @@ def test_multiply(): assert Calculator.multiply(-4, 2.0) == -8.0 def test_divide(): + if random.random() < 0.2: + assert True == False # assert Calculator.divide(1, 2) == 0.5 assert Calculator.divide(1.0, 2.0) == 0.5 assert Calculator.divide(0, 2.0) == 0 From 765520e8d550c6d7518c54b48b8b28ba030d5a45 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Sat, 13 Sep 2025 02:53:29 +0200 Subject: [PATCH 2/4] fix: add fetch-depth --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b67c5e..d94cd5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Set up Python 3.10 uses: actions/setup-python@v4 with: From d0e41bb1fb7f4c78f7112bace5e591ec13023c20 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Sat, 13 Sep 2025 02:56:18 +0200 Subject: [PATCH 3/4] fix: fail --- app/test_calculator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/test_calculator.py b/app/test_calculator.py index effe6ac..0927734 100644 --- a/app/test_calculator.py +++ b/app/test_calculator.py @@ -3,6 +3,9 @@ from .calculator import Calculator +def test_fail(): + assert True == False + def test_add(): assert Calculator.add(1, 2) == 3.0 assert Calculator.add(1.0, 2.0) == 3.0 From 84730ab93ea48e65dd47e7add634f53f2bc15c7f Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Sat, 13 Sep 2025 03:00:51 +0200 Subject: [PATCH 4/4] fix: try one more time --- app/test_calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test_calculator.py b/app/test_calculator.py index 0927734..27345dc 100644 --- a/app/test_calculator.py +++ b/app/test_calculator.py @@ -7,7 +7,7 @@ def test_fail(): assert True == False def test_add(): - assert Calculator.add(1, 2) == 3.0 + # assert Calculator.add(1, 2) == 3.0 assert Calculator.add(1.0, 2.0) == 3.0 assert Calculator.add(0, 2.0) == 2.0 assert Calculator.add(2.0, 0) == 2.0