File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,31 +24,31 @@ An example of a simple test:
2424.. code-block :: python
2525
2626 # content of test_sample.py
27- def func (x ):
27+ def inc (x ):
2828 return x + 1
2929
3030 def test_answer ():
31- assert func (3 ) == 5
31+ assert inc (3 ) == 5
3232
3333
3434 To execute it::
3535
3636 $ pytest
37- ======= test session starts ========
37+ ============================= test session starts =============================
3838 collected 1 items
3939
4040 test_sample.py F
4141
42- ======= FAILURES ========
43- _______ test_answer ________
42+ ================================== FAILURES =========================== ========
43+ _________________________________ test_answer _________________________________
4444
4545 def test_answer():
46- > assert func (3) == 5
46+ > assert inc (3) == 5
4747 E assert 4 == 5
48- E + where 4 = func (3)
48+ E + where 4 = inc (3)
4949
5050 test_sample.py:5: AssertionError
51- ======= 1 failed in 0.12 seconds ========
51+ ========================== 1 failed in 0.04 seconds =================== ========
5252
5353
5454Due to ``pytest ``'s detailed assertion introspection, only plain ``assert `` statements are used. See `getting-started <http://docs.pytest.org/en/latest/getting-started.html#our-first-test-run >`_ for more examples.
Original file line number Diff line number Diff line change @@ -14,33 +14,31 @@ An example of a simple test:
1414.. code-block :: python
1515
1616 # content of test_sample.py
17- def func (x ):
17+ def inc (x ):
1818 return x + 1
1919
2020 def test_answer ():
21- assert func (3 ) == 5
21+ assert inc (3 ) == 5
2222
2323
2424 To execute it::
2525
2626 $ pytest
27- ======= test session starts ========
28- platform linux -- Python 3.5.2, pytest-3.0.4, py-1.4.31, pluggy-0.4.0
29- rootdir: $REGENDOC_TMPDIR, inifile:
27+ ============================= test session starts =============================
3028 collected 1 items
31-
29+
3230 test_sample.py F
33-
34- ======= FAILURES ========
35- _______ test_answer ________
36-
31+
32+ ================================== FAILURES =========================== ========
33+ _________________________________ test_answer _________________________________
34+
3735 def test_answer():
38- > assert func (3) == 5
36+ > assert inc (3) == 5
3937 E assert 4 == 5
40- E + where 4 = func (3)
41-
38+ E + where 4 = inc (3)
39+
4240 test_sample.py:5: AssertionError
43- ======= 1 failed in 0.12 seconds ========
41+ ========================== 1 failed in 0.04 seconds =================== ========
4442
4543Due to ``pytest ``'s detailed assertion introspection, only plain ``assert `` statements are used.
4644See :ref: `Getting Started <getstarted >` for more examples.
You can’t perform that action at this time.
0 commit comments