1
- |Travis Build Status | |AppVeyor Build status | |Coveralls coverage |
1
+ |Travis Build Status | |AppVeyor Build status | |Coverage |
2
2
3
3
About
4
4
-----
@@ -30,21 +30,15 @@ This plugin is compatible with Python 2.7, and 3.5 and later, and
30
30
requires `pytest <http://pytest.org >`__ and
31
31
`numpy <http://www.numpy.org >`__ to be installed.
32
32
33
- To install, you can do:
34
-
35
- ::
33
+ To install, you can do::
36
34
37
35
pip install pytest-arraydiff
38
36
39
- You can check that the plugin is registered with pytest by doing:
40
-
41
- ::
37
+ You can check that the plugin is registered with pytest by doing::
42
38
43
39
py.test --version
44
40
45
- which will show a list of plugins:
46
-
47
- ::
41
+ which will show a list of plugins::
48
42
49
43
This is pytest version 2.7.1, imported from ...
50
44
setuptools registered plugins:
55
49
56
50
To use, you simply need to mark the function where you want to compare
57
51
arrays using ``@pytest.mark.array_compare ``, and make sure that the
58
- function returns a plain Numpy array:
59
-
60
- ::
52
+ function returns a plain Numpy array::
61
53
62
54
python
63
55
import pytest
@@ -69,9 +61,7 @@ function returns a plain Numpy array:
69
61
70
62
To generate the reference data files, run the tests with the
71
63
``--arraydiff-generate-path `` option with the name of the directory
72
- where the generated files should be placed:
73
-
74
- ::
64
+ where the generated files should be placed::
75
65
76
66
py.test --arraydiff-generate-path=reference
77
67
@@ -85,9 +75,7 @@ to a sub-directory called ``reference`` relative to the test files (this
85
75
name is configurable, see below). You can also generate the baseline
86
76
arrays directly in the right directory.
87
77
88
- You can then run the tests simply with:
89
-
90
- ::
78
+ You can then run the tests simply with::
91
79
92
80
py.test --arraydiff
93
81
@@ -153,9 +141,7 @@ also be a URL (which should start with ``http://`` or ``https://`` and
153
141
end in a slash).
154
142
155
143
Finally, you can also set a custom baseline directory globally when
156
- running tests by running ``py.test `` with:
157
-
158
- ::
144
+ running tests by running ``py.test `` with::
159
145
160
146
py.test --arraydiff --arraydiff-reference-path=baseline_arrays
161
147
@@ -169,9 +155,7 @@ Test failure example
169
155
170
156
If the arrays produced by the tests are correct, then the test will
171
157
pass, but if they are not, the test will fail with a message similar to
172
- the following:
173
-
174
- ::
158
+ the following::
175
159
176
160
E AssertionError:
177
161
E
@@ -195,9 +179,7 @@ Running the tests for pytest-arraydiff
195
179
--------------------------------------
196
180
197
181
If you are contributing some changes and want to run the tests, first
198
- install the latest version of the plugin then do:
199
-
200
- ::
182
+ install the latest version of the plugin then do::
201
183
202
184
cd tests
203
185
py.test --arraydiff
@@ -207,7 +189,7 @@ plugin is correctly loaded as part of the test suite.
207
189
208
190
.. |Travis Build Status | image :: https://travis-ci.org/astrofrog/pytest-arraydiff.svg?branch=master
209
191
:target: https://travis-ci.org/astrofrog/pytest-arraydiff
210
- .. |AppVeyor Build status | image :: https://ci.appveyor.com/api/projects/status/4hfoe954rxhgslsl /branch/master?svg=true
211
- :target: https://ci.appveyor.com/project/astrofrog /pytest-arraydiff
212
- .. |Coveralls coverage | image :: https://coveralls .io/repos/matplotlib /pytest-arraydiff/badge.svg
213
- :target: https://coveralls .io/r/matplotlib /pytest-arraydiff
192
+ .. |AppVeyor Build status | image :: https://ci.appveyor.com/api/projects/status/0nech6qgp8jlabjp /branch/master?svg=true
193
+ :target: https://ci.appveyor.com/project/astropy /pytest-arraydiff
194
+ .. |Coverage | image :: https://codecov .io/gh/astropy /pytest-arraydiff/branch/master/graph /badge.svg
195
+ :target: https://codecov .io/gh/astropy /pytest-arraydiff
0 commit comments