~crunch.io/ubuntu/precise/codespeak-lib/unstable

« back to all changes in this revision

Viewing changes to doc/test/quickstart.txt

  • Committer: Bazaar Package Importer
  • Author(s): Chris Lamb
  • Date: 2010-08-01 16:24:01 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100801162401-g37v49d1p148alpm
Tags: 1.3.3-1
* New upstream release.
* Bump Standards-Version to 3.9.1.
* Fix typo in py.test manpage.
* Prefer Breaks: over Conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 
10
10
If you have the ``easy_install`` tool (otherwise see here_) just type::
11
11
 
12
 
    easy_install -U py 
13
 
 
14
 
Now create a file ``test_sample.py`` with the following content: 
15
 
 
16
 
.. sourcecode:: python 
17
 
 
18
 
    # content of test_sample.py 
 
12
    easy_install -U py
 
13
 
 
14
Now create a file ``test_sample.py`` with the following content:
 
15
 
 
16
.. sourcecode:: python
 
17
 
 
18
    # content of test_sample.py
19
19
    def func(x):
20
20
        return x + 1
21
21
    def test_answer():
27
27
 
28
28
and will see output like this:
29
29
 
30
 
.. sourcecode:: python 
 
30
.. sourcecode:: python
31
31
 
32
32
    =========================== test session starts ============================
33
33
    python: platform linux2 -- Python 2.6.2 -- pytest-1.1.0
46
46
    test_sample.py:6: AssertionError
47
47
    ========================= 1 failed in 0.08 seconds =========================
48
48
 
49
 
This output contains Python interpreter information, a list of test objects, 
50
 
a progress report and important details of the failure. 
 
49
This output contains Python interpreter information, a list of test objects,
 
50
a progress report and important details of the failure.
51
51
 
52
52
**Where to go from here**
53
53
 
54
54
`features`_: overview and description of test features
55
55
 
56
 
`plugins`_: a list of available plugins which each contain usage examples 
 
56
`plugins`_: a list of available plugins which each contain usage examples
57
57
 
58
58
`tutorials`_: some blog entries and starting points with code examples
59
59