Skip to content

Commit 522224e

Browse files
Merge pull request pytest-dev#1285 from nicoddemus/readme-changes-logo
Add logo and some readme changes
2 parents 015e8e5 + b5490b2 commit 522224e

File tree

1 file changed

+64
-33
lines changed

1 file changed

+64
-33
lines changed

README.rst

Lines changed: 64 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
======
2-
pytest
3-
======
1+
.. image:: doc/en/img/pytest1.png
2+
:target: http://pytest.org
3+
:align: center
4+
:alt: pytest
45

5-
The ``pytest`` testing tool makes it easy to write small tests, yet
6-
scales to support complex functional testing.
6+
------
77

88
.. image:: https://img.shields.io/pypi/v/pytest.svg
99
:target: https://pypi.python.org/pypi/pytest
@@ -14,53 +14,84 @@ scales to support complex functional testing.
1414
.. image:: https://ci.appveyor.com/api/projects/status/mrgbjaua7t33pg6b?svg=true
1515
:target: https://ci.appveyor.com/project/pytestbot/pytest
1616

17-
Documentation: http://pytest.org/latest/
17+
The ``pytest`` framework makes it easy to write small tests, yet
18+
scales to support complex functional testing for applications and libraries.
1819

19-
Changelog: http://pytest.org/latest/changelog.html
20+
An example of a simple test:
2021

21-
Issues: https://github.com/pytest-dev/pytest/issues
22+
.. code-block:: python
23+
24+
# content of test_sample.py
25+
def func(x):
26+
return x + 1
27+
28+
def test_answer():
29+
assert func(3) == 5
30+
31+
32+
To execute it::
33+
34+
$ py.test
35+
======= test session starts ========
36+
platform linux -- Python 3.4.3, pytest-2.8.5, py-1.4.31, pluggy-0.3.1
37+
collected 1 items
38+
39+
test_sample.py F
40+
41+
======= FAILURES ========
42+
_______ test_answer ________
43+
44+
def test_answer():
45+
> assert func(3) == 5
46+
E assert 4 == 5
47+
E + where 4 = func(3)
48+
49+
test_sample.py:5: AssertionError
50+
======= 1 failed in 0.12 seconds ========
51+
52+
Due to ``py.test``'s detailed assertion introspection, only plain ``assert`` statements are used. See `getting-started <http://pytest.org/latest/getting-started.html#our-first-test-run>`_ for more examples.
53+
2254

2355
Features
2456
--------
2557

26-
- `auto-discovery
58+
- Detailed info on failing `assert statements <http://pytest.org/latest/assert.html>`_ (no need to remember ``self.assert*`` names);
59+
60+
- `Auto-discovery
2761
<http://pytest.org/latest/goodpractises.html#python-test-discovery>`_
28-
of test modules and functions,
29-
- detailed info on failing `assert statements <http://pytest.org/latest/assert.html>`_ (no need to remember ``self.assert*`` names)
30-
- `modular fixtures <http://pytest.org/latest/fixture.html>`_ for
31-
managing small or parametrized long-lived test resources.
32-
- multi-paradigm support: you can use ``pytest`` to run test suites based
33-
on `unittest <http://pytest.org/latest/unittest.html>`_ (or trial),
34-
`nose <http://pytest.org/latest/nose.html>`_
35-
- single-source compatibility from Python2.6 all the way up to
36-
Python3.5, PyPy-2.3, (jython-2.5 untested)
62+
of test modules and functions;
3763

64+
- `Modular fixtures <http://pytest.org/latest/fixture.html>`_ for
65+
managing small or parametrized long-lived test resources;
3866

39-
- many `external plugins <http://pytest.org/latest/plugins.html#installing-external-plugins-searching>`_.
67+
- Can run `unittest <http://pytest.org/latest/unittest.html>`_ (or trial),
68+
`nose <http://pytest.org/latest/nose.html>`_ test suites out of the box;
4069

41-
A simple example for a test:
70+
- Python2.6+, Python3.2+, PyPy-2.3, Jython-2.5 (untested);
4271

43-
.. code-block:: python
72+
- Rich plugin architecture, with over 150+ `external plugins <http://pytest.org/latest/plugins.html#installing-external-plugins-searching>`_ and thriving comminity;
73+
74+
75+
Documentation
76+
-------------
4477

45-
# content of test_module.py
46-
def test_function():
47-
i = 4
48-
assert i == 3
78+
For full documentation, including installation, tutorials and PDF documents, please see http://pytest.org.
4979

50-
which can be run with ``py.test test_module.py``. See `getting-started <http://pytest.org/latest/getting-started.html#our-first-test-run>`_ for more examples.
5180

52-
For much more info, including PDF docs, see
81+
Bugs/Requests
82+
-------------
5383

54-
http://pytest.org
84+
Please use the `GitHub issue tracker <https://github.com/pytest-dev/pytest/issues>`_ to submit bugs or feature requests.
5585

56-
and report bugs at:
5786

58-
https://github.com/pytest-dev/pytest/issues
87+
Changelog
88+
---------
5989

60-
and checkout or fork repo at:
90+
Consult the `Changelog <http://pytest.org/latest/changelog.html>`_ page for fixes and enhancements for each version.
6191

62-
https://github.com/pytest-dev/pytest
6392

93+
License
94+
-------
6495

65-
Copyright Holger Krekel and others, 2004-2015
96+
Copyright Holger Krekel and others, 2004-2015.
6697
Licensed under the MIT license.

0 commit comments

Comments
 (0)