Skip to content

Commit f2300fb

Browse files
committed
Fix links in docs
1 parent 4585238 commit f2300fb

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed

doc/en/existingtestsuite.rst

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
1+
.. _existingtestsuite:
2+
13
Using pytest with an existing test suite
24
===========================================
35

4-
Pytest can be used with most existing test suites, but its
5-
behavior differs from other test runners such as :ref:`nose` or
6-
Python's default unittest framework.
6+
Pytest can be used with most existing test suites, but its
7+
behavior differs from other test runners such as :ref:`nose <noseintegration>` or
8+
Python's default unittest framework.
79

8-
Before using this section you will want to :ref:`getting-started <install pytest>`.
10+
Before using this section you will want to :ref:`install pytest <getstarted>`.
911

1012
Running an existing test suite with pytest
1113
---------------------------------------------
1214

13-
Say you want to contribute to an existing repository somewhere.
14-
After pulling the code into your development space using some
15+
Say you want to contribute to an existing repository somewhere.
16+
After pulling the code into your development space using some
1517
flavor of version control and (optionally) setting up a virtualenv
1618
you will want to run::
17-
19+
1820
cd <repository>
19-
pip install -e . # Environment dependent alternatives include
20-
# 'python setup.py develop' and 'conda develop'
21+
pip install -e . # Environment dependent alternatives include
22+
# 'python setup.py develop' and 'conda develop'
2123

2224
in your project root. This will set up a symlink to your code in
2325
site-packages, allowing you to edit your code while your tests
2426
run against it as if it were installed.
2527

26-
Setting up your project in development mode lets you avoid having to
27-
reinstall every time you want to run your tests, and is less brittle than
28+
Setting up your project in development mode lets you avoid having to
29+
reinstall every time you want to run your tests, and is less brittle than
2830
mucking about with sys.path to point your tests at local code.
2931

30-
Also consider using `Tox <https://tox.readthedocs.io/en/latest>`_.
32+
Also consider using :ref:`tox <use tox>`.
3133

3234
.. include:: links.inc

doc/en/getting-started.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ That's it. You can execute the test function now::
4949
platform linux -- Python 3.5.2, pytest-3.0.7, py-1.4.32, pluggy-0.4.0
5050
rootdir: $REGENDOC_TMPDIR, inifile:
5151
collected 1 items
52-
52+
5353
test_sample.py F
54-
54+
5555
======= FAILURES ========
5656
_______ test_answer ________
57-
57+
5858
def test_answer():
5959
> assert func(3) == 5
6060
E assert 4 == 5
6161
E + where 4 = func(3)
62-
62+
6363
test_sample.py:5: AssertionError
6464
======= 1 failed in 0.12 seconds ========
6565

@@ -128,15 +128,15 @@ run the module by passing its filename::
128128
.F
129129
======= FAILURES ========
130130
_______ TestClass.test_two ________
131-
131+
132132
self = <test_class.TestClass object at 0xdeadbeef>
133-
133+
134134
def test_two(self):
135135
x = "hello"
136136
> assert hasattr(x, 'check')
137137
E AssertionError: assert False
138138
E + where False = hasattr('hello', 'check')
139-
139+
140140
test_class.py:8: AssertionError
141141
1 failed, 1 passed in 0.12 seconds
142142

@@ -165,14 +165,14 @@ before performing the test function call. Let's just run it::
165165
F
166166
======= FAILURES ========
167167
_______ test_needsfiles ________
168-
168+
169169
tmpdir = local('PYTEST_TMPDIR/test_needsfiles0')
170-
170+
171171
def test_needsfiles(tmpdir):
172172
print (tmpdir)
173173
> assert 0
174174
E assert 0
175-
175+
176176
test_tmpdir.py:3: AssertionError
177177
--------------------------- Captured stdout call ---------------------------
178178
PYTEST_TMPDIR/test_needsfiles0
@@ -191,8 +191,8 @@ Where to go next
191191
Here are a few suggestions where to go next:
192192

193193
* :ref:`cmdline` for command line invocation examples
194-
* :ref:`existingtestsuite` for working with pre-existing tests
195194
* :ref:`good practices <goodpractices>` for virtualenv, test layout
195+
* :ref:`existingtestsuite` for working with pre-existing tests
196196
* :ref:`fixtures` for providing a functional baseline to your tests
197197
* :ref:`plugins` managing and writing plugins
198198

0 commit comments

Comments
 (0)