/
cov_average.txt
32 lines (25 loc) · 1.58 KB
/
cov_average.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
============================= test session starts ==============================
platform linux -- Python 3.6.6, pytest-5.4.2, py-1.5.2, pluggy-0.13.1
benchmark: 3.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/ptisnovs/src/python/testing-in-python/pytest/average8
plugins: voluptuous-1.0.2, benchmark-3.2.3, cov-2.5.1
collected 7 items
test_average.py ....F.. [100%]
=================================== FAILURES ===================================
__________________________ test_average_basic_2[0,10] __________________________
values = (0, 10), expected = 0.5
@pytest.mark.parametrize("values,expected", testdata, ids=["1,1", "1,2", "0,1", "1,2,3", "0,10"])
def test_average_basic_2(values, expected):
"""Otestování výpočtu průměru."""
result = average(values)
> assert result == expected, "Očekávaná hodnota {}, vráceno {}".format(expected, result)
E AssertionError: Očekávaná hodnota 0.5, vráceno 5.0
E assert 5.0 == 0.5
test_average.py:21: AssertionError
----------- coverage: platform linux, python 3.6.6-final-0 -----------
Name Stmts Miss Cover
--------------------------------
average.py 2 0 100%
=========================== short test summary info ============================
FAILED test_average.py::test_average_basic_2[0,10] - AssertionError: Očekávan...
========================= 1 failed, 6 passed in 0.05s ==========================