Skip to content

Commit b141c52

Browse files
authored
Merge pull request #10 from tylerjereddy/treddy_markdown_cleanup
DOC: Markdown formatting
2 parents a99a0d3 + 780de55 commit b141c52

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

README.md

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# pytest-regex
1+
pytest-regex
2+
------------
23

3-
## Use Python Standard Library Regular Expressions to Specify Tests to Run
4+
Use Python Standard Library Regular Expressions to Specify Tests to Run
5+
-----------------------------------------------------------------------
46

57
After installing locally with i.e., `python -m pip install .` you can
68
compare it with more conventional test selection techniques as follows.
@@ -13,37 +15,34 @@ built-in `-k` flag:
1315

1416
This runs a bunch of tests with string matches as you might expect:
1517

16-
```
17-
scipy/io/tests/test_idl.py::TestArrayDimensions::test_3d PASSED
18-
scipy/io/tests/test_idl.py::TestPointerArray::test_3d PASSED
19-
scipy/optimize/_trustregion_constr/tests/test_qp_subproblem.py::TestBoxBoundariesIntersections::test_3d_box_constraints PASSED
20-
scipy/optimize/_trustregion_constr/tests/test_qp_subproblem.py::TestBoxBoundariesIntersections::test_3d_box_constraints_entire_line PASSED
21-
scipy/optimize/_trustregion_constr/tests/test_qp_subproblem.py::TestModifiedDogleg::test_3d_example PASSED
22-
scipy/stats/tests/test_stats.py::TestGeometricStandardDeviation::test_3d_array PASSED
23-
scipy/stats/tests/test_stats.py::TestGeometricStandardDeviation::test_3d_array_axis_type_tuple PASSED
24-
scipy/stats/tests/test_stats.py::TestGeometricStandardDeviation::test_3d_array_axis_0 PASSED
25-
scipy/stats/tests/test_stats.py::TestGeometricStandardDeviation::test_3d_array_axis_1 PASSED
26-
scipy/stats/tests/test_stats.py::TestGeometricStandardDeviation::test_3d_array_axis_2 PASSED
27-
scipy/stats/tests/test_stats.py::TestFOneWay::test_3d_inputs PASSED
28-
```
18+
scipy/io/tests/test_idl.py::TestArrayDimensions::test_3d PASSED
19+
scipy/io/tests/test_idl.py::TestPointerArray::test_3d PASSED
20+
scipy/optimize/_trustregion_constr/tests/test_qp_subproblem.py::TestBoxBoundariesIntersections::test_3d_box_constraints PASSED
21+
scipy/optimize/_trustregion_constr/tests/test_qp_subproblem.py::TestBoxBoundariesIntersections::test_3d_box_constraints_entire_line PASSED
22+
scipy/optimize/_trustregion_constr/tests/test_qp_subproblem.py::TestModifiedDogleg::test_3d_example PASSED
23+
scipy/stats/tests/test_stats.py::TestGeometricStandardDeviation::test_3d_array PASSED
24+
scipy/stats/tests/test_stats.py::TestGeometricStandardDeviation::test_3d_array_axis_type_tuple PASSED
25+
scipy/stats/tests/test_stats.py::TestGeometricStandardDeviation::test_3d_array_axis_0 PASSED
26+
scipy/stats/tests/test_stats.py::TestGeometricStandardDeviation::test_3d_array_axis_1 PASSED
27+
scipy/stats/tests/test_stats.py::TestGeometricStandardDeviation::test_3d_array_axis_2 PASSED
28+
scipy/stats/tests/test_stats.py::TestFOneWay::test_3d_inputs PASSED
2929

3030
What if you want to run only tests with an exact match to `test_3d` or
3131
`test_3d_example`?
3232

3333
Try `pytest-regex` with:
34-
`python dev.py test -- -v --regex "(.*test_3d$|.*test_3d_example$)"`
34+
python dev.py test -- -v --regex "(.*test_3d$|.*test_3d_example$)"
3535

3636

37-
```
38-
scipy/io/tests/test_idl.py::TestArrayDimensions::test_3d PASSED
39-
scipy/io/tests/test_idl.py::TestPointerArray::test_3d PASSED
40-
scipy/optimize/_trustregion_constr/tests/test_qp_subproblem.py::TestModifiedDogleg::test_3d_example PASSED
41-
```
37+
scipy/io/tests/test_idl.py::TestArrayDimensions::test_3d PASSED
38+
scipy/io/tests/test_idl.py::TestPointerArray::test_3d PASSED
39+
scipy/optimize/_trustregion_constr/tests/test_qp_subproblem.py::TestModifiedDogleg::test_3d_example PASSED
4240

4341
This does what we want, and is probably more concise than the `-k` alternative. In fact,
4442
I'm not entirely sure how one would do this with `-k` in its current form.
4543

46-
## How it Works
44+
How it Works
45+
------------
4746

4847
`pytest-regex` simply passes the Python regular expression through
4948
to the list of node ids, where a node id is structured as follows:

0 commit comments

Comments
 (0)