We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a338c3 commit ca3a4d4Copy full SHA for ca3a4d4
app/test_calculator.py
@@ -1,4 +1,6 @@
1
from .calculator import Calculator
2
+import time
3
+import random
4
5
6
def test_add():
@@ -29,3 +31,13 @@ def test_divide():
29
31
assert Calculator.divide(0, 2.0) == 0
30
32
assert Calculator.divide(-4, 2.0) == -2.0
33
# assert Calculator.divide(2.0, 0.0) == 'Cannot divide by 0'
34
+
35
+def test_fail():
36
+ assert True == False
37
38
+def test_flaky():
39
+ assert random.random() < 0.8 # This should fail 20% of the time
40
41
+def test_slow():
42
+ time.sleep(5)
43
+ assert True == True
0 commit comments