Skip to content

Commit 5338aa7

Browse files
committed
Use "inc" instead of "func" in the snipped on README
"inc" reads better, also fixed the line separators so they have the same size
1 parent 4837542 commit 5338aa7

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

README.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff 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

5454
Due 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.

0 commit comments

Comments
 (0)