Skip to content

Commit 2c5f476

Browse files
authored
Merge pull request #47 from njsmith/docs
First draft of manual
2 parents dd27d70 + 6d10627 commit 2c5f476

6 files changed

Lines changed: 818 additions & 13 deletions

File tree

README.rst

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,49 @@
11
pytest-trio
22
===========
33

4+
.. image:: https://img.shields.io/badge/chat-join%20now-blue.svg
5+
:target: https://gitter.im/python-trio/general
6+
:alt: Join chatroom
7+
8+
.. image:: https://img.shields.io/badge/docs-read%20now-blue.svg
9+
:target: https://pytest-trio.readthedocs.io/en/latest/?badge=latest
10+
:alt: Documentation Status
11+
12+
.. image:: https://img.shields.io/pypi/v/pytest-trio.svg
13+
:target: https://pypi.org/project/pytest-trio
14+
:alt: Latest PyPi version
15+
416
.. image:: https://travis-ci.org/python-trio/pytest-trio.svg?branch=master
5-
:target: https://travis-ci.org/python-trio/pytest-trio
17+
:target: https://travis-ci.org/python-trio/pytest-trio
18+
:alt: Automated test status (Linux and MacOS)
619

720
.. image:: https://ci.appveyor.com/api/projects/status/aq0pklx7hanx031x?svg=true
8-
:target: https://ci.appveyor.com/project/touilleMan/pytest-trio
21+
:target: https://ci.appveyor.com/project/touilleMan/pytest-trio
22+
:alt: Automated test status (Windows)
923

1024
.. image:: https://codecov.io/gh/python-trio/pytest-trio/branch/master/graph/badge.svg
11-
:target: https://codecov.io/gh/python-trio/pytest-trio
25+
:target: https://codecov.io/gh/python-trio/pytest-trio
26+
:alt: Test coverage
27+
28+
This is a pytest plugin to help you test projects that use `Trio
29+
<https://trio.readthedocs.io/>`__, a friendly library for concurrency
30+
and async I/O in Python. For an overview of features, see our `manual
31+
<https://pytest-trio.readthedocs.io>`__, or jump straight to the
32+
`quickstart guide
33+
<https://pytest-trio.readthedocs.io/en/latest/quickstart.html>`__.
34+
35+
36+
Vital statistics
37+
----------------
38+
39+
**Documentation:** https://pytest-trio.readthedocs.io
1240

13-
Welcome to `pytest-trio <https://github.com/python-trio/pytest-trio>`__!
41+
**Bug tracker and source code:**
42+
https://github.com/python-trio/pytest-trio
1443

15-
Pytest plugin for trio
44+
**License:** MIT or Apache 2, your choice.
1645

17-
License: Your choice of MIT or Apache License 2.0
46+
**Code of conduct:** Contributors are requested to follow our `code of
47+
conduct
48+
<https://github.com/python-trio/pytest-trio/blob/master/CODE_OF_CONDUCT.md>`__
49+
in all project spaces.

docs/source/history.rst

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,27 @@ Release history
55

66
.. towncrier release notes start
77
8-
Pytest_Trio 0.4.2 (2018-06-29)
8+
pytest-trio 0.5.0 (????-??-??)
9+
------------------------------
10+
11+
This is a major release, including a rewrite of large portions of the
12+
internals. We believe it should be backwards compatible with existing
13+
projects, but major new features include:
14+
15+
* "trio mode": no more writing ``@pytest.mark.trio`` everywhere!
16+
* it's now safe to use nurseries inside fixtures (`#55
17+
<https://github.com/python-trio/pytest-trio/issues/55>`__)
18+
* new ``@trio_fixture`` decorator to explicitly mark a fixture as a
19+
trio fixture
20+
* a number of easy-to-make mistakes are now caught and raise
21+
informative errors
22+
* the :data:`nursery` fixture is now 87% more magical
23+
24+
For more details, see the manual. Oh right, speaking of which: we
25+
finally have a manual! You should read it.
26+
27+
28+
pytest-trio 0.4.2 (2018-06-29)
929
------------------------------
1030

1131
Features
@@ -16,20 +36,20 @@ Features
1636
using Trio. (`#42 <https://github.com/python-trio/pytest-trio/issues/42>`__)
1737

1838

19-
Pytest_Trio 0.4.1 (2018-04-14)
39+
pytest-trio 0.4.1 (2018-04-14)
2040
------------------------------
2141

2242
No significant changes.
2343

2444

25-
Pytest_Trio 0.4.0 (2018-04-14)
45+
pytest-trio 0.4.0 (2018-04-14)
2646
------------------------------
2747

2848
- Fix compatibility with trio 0.4.0 (`#25
2949
<https://github.com/python-trio/pytest-trio/pull/36>`__)
3050

3151

32-
Pytest_Trio 0.3.0 (2018-01-03)
52+
pytest-trio 0.3.0 (2018-01-03)
3353
------------------------------
3454

3555
Features
@@ -39,7 +59,7 @@ Features
3959
<https://github.com/python-trio/pytest-trio/issues/25>`__)
4060

4161

42-
Pytest_Trio 0.2.0 (2017-12-15)
62+
pytest-trio 0.2.0 (2017-12-15)
4363
------------------------------
4464

4565
- Heavy improvements, add async yield fixture, fix bugs, add tests etc. (`#17
@@ -53,14 +73,14 @@ Deprecations and Removals
5373
<https://github.com/python-trio/pytest-trio/issues/15>`__)
5474

5575

56-
Pytest_Trio 0.1.1 (2017-12-08)
76+
pytest-trio 0.1.1 (2017-12-08)
5777
------------------------------
5878

5979
Disable intersphinx for trio (cause crash in CI for the moment due to 404
6080
in readthedoc).
6181

6282

63-
Pytest_Trio 0.1.0 (2017-12-08)
83+
pytest-trio 0.1.0 (2017-12-08)
6484
------------------------------
6585

6686
Initial release.

docs/source/index.rst

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,64 @@
88
pytest-trio: Pytest plugin for trio
99
===================================
1010

11+
This is a pytest plugin to help you test projects that use `Trio
12+
<https://trio.readthedocs.io/>`__, a friendly library for concurrency
13+
and async I/O in Python. Features include:
14+
15+
* Async tests without the boilerplate: just write ``async def
16+
test_whatever(): ...``.
17+
18+
* Useful fixtures included: use :data:`autojump_clock` for easy
19+
testing of code with timeouts, or :data:`nursery` to easily set up
20+
background tasks.
21+
22+
* Write your own async fixtures: set up an async database connection
23+
or start a server inside a fixture, and then use it in your tests.
24+
25+
* If you have multiple async fixtures, pytest-trio will even do
26+
setup/teardown concurrently whenever possible. (Though honestly,
27+
we're not sure whether this is a good idea or not and might remove
28+
it in the future. If it makes your tests harder to debug, or
29+
conversely provides you with big speedups, `please let us know
30+
<https://github.com/python-trio/pytest-trio/issues/57>`__.)
31+
32+
* Integration with the fabulous `Hypothesis
33+
<https://hypothesis.works/>`__ library, so your async tests can use
34+
property-based testing: just use ``@given`` like you're used to.
35+
36+
* Support for testing projects that use Trio exclusively and want to
37+
use pytest-trio everywhere, and also for testing projects that
38+
support multiple async libraries and only want to enable
39+
pytest-trio's features for a subset of their test suite.
40+
41+
42+
Vital statistics
43+
================
44+
45+
* Install: ``pip install pytest-trio``
46+
47+
* Documentation: https://pytest-trio.readthedocs.io
48+
49+
* Issue tracker, source code: https://github.com/python-trio/pytest-trio
50+
51+
* License: MIT or Apache 2, your choice
52+
53+
* Contributor guide: https://trio.readthedocs.io/en/latest/contributing.html
54+
55+
* Code of conduct: Contributors are requested to follow our `code of
56+
conduct
57+
<https://trio.readthedocs.io/en/latest/code-of-conduct.html>`__ in
58+
all project spaces.
59+
1160
.. toctree::
1261
:maxdepth: 2
1362

63+
quickstart.rst
64+
reference.rst
65+
66+
.. toctree::
67+
:maxdepth: 1
68+
1469
history.rst
1570

1671
====================

0 commit comments

Comments
 (0)