Skip to content

Commit ac0ada2

Browse files
authored
Miscellaneous README improvements
* Use titles for options and remove screenshot * Add a TOC * Remove old screenshot * Add example usage
1 parent 4b3d831 commit ac0ada2

File tree

2 files changed

+31
-18
lines changed

2 files changed

+31
-18
lines changed

README.rst

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22
pytest-cpp
33
==========
44

5-
Use `pytest <https://pypi.python.org/pypi/pytest>`_ runner to discover and execute C++ tests.
6-
75
|python| |version| |anaconda| |ci| |black|
86

7+
Use `pytest <https://pypi.python.org/pypi/pytest>`_ runner to discover and execute C++ tests.
8+
99
Supports `Google Test <https://code.google.com/p/googletest>`_,
1010
`Boost::Test <http://www.boost.org/doc/libs/release/libs/test>`_,
1111
and `Catch2 <https://github.com/catchorg/Catch2>`_:
1212

13-
.. image:: https://raw.githubusercontent.com/pytest-dev/pytest-cpp/master/images/screenshot.png
14-
1513
.. |version| image:: http://img.shields.io/pypi/v/pytest-cpp.png
1614
:target: https://crate.io/packages/pytest-cpp
1715

@@ -39,17 +37,37 @@ This brings several benefits:
3937
* Filter which tests to run using standard test filtering capabilities, such as
4038
by file names, directories, keywords by using the ``-k`` option, etc.;
4139

40+
.. contents:: **Table of Contents**
41+
42+
43+
Installation
44+
============
45+
46+
Install using `pip <http://pip-installer.org/>`_:
47+
48+
.. code-block:: console
49+
50+
$ pip install pytest-cpp
51+
4252
Usage
4353
=====
4454

45-
Once installed, when py.test runs it will search and run tests
46-
found in executable files, detecting if the suites are
55+
.. code-block:: console
56+
57+
$ pytest
58+
59+
Once installed, pytest runs will search and run tests
60+
found in **executable** files, detecting if the suites are
4761
Google, Boost, or Catch2 tests automatically.
4862

4963
Configuration Options
5064
~~~~~~~~~~~~~~~~~~~~~
5165

52-
**cpp_files**
66+
Following are the options that can be put in the pytest configuration file related
67+
to pytest-cpp.
68+
69+
cpp_files
70+
^^^^^^^^^
5371

5472
You can configure which files are tested for suites by using the ``cpp_files``
5573
ini configuration option:
@@ -61,7 +79,8 @@ ini configuration option:
6179
6280
By default matches ``test_*`` and ``*_test`` executable files.
6381

64-
**cpp_arguments**
82+
cpp_arguments
83+
^^^^^^^^^^^^^
6584

6685
*New in version 1.1*.
6786

@@ -82,7 +101,8 @@ pytest's ``-o`` option:
82101
83102
$ pytest -o cpp_arguments='-v --log-dir=logs'
84103
85-
**cpp_ignore_py_files**
104+
cpp_ignore_py_files
105+
^^^^^^^^^^^^^^^^^^^
86106

87107
*New in version 1.2*.
88108

@@ -96,7 +116,8 @@ Set it to ``False`` if you have C++ executable files that end with the ``*.py``
96116
[pytest]
97117
cpp_ignore_py_files = False
98118
99-
**cpp_harness**
119+
cpp_harness
120+
^^^^^^^^^^^
100121

101122
*New in version 1.3*.
102123

@@ -108,14 +129,6 @@ wrapping the test binary, like valgrind and memcheck:
108129
[pytest]
109130
cpp_harness = valgrind --tool=memcheck
110131
111-
Install
112-
=======
113-
114-
Install using `pip <http://pip-installer.org/>`_:
115-
116-
.. code-block:: console
117-
118-
$ pip install pytest-cpp
119132
120133
Changelog
121134
=========

images/screenshot.png

-19.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)