Skip to content

Commit d6f8a15

Browse files
authored
Add diagrams for design illustration (#34)
1 parent e5c04a1 commit d6f8a15

5 files changed

+25
-1
lines changed

README.rst

+24
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ The plugin allows user to control the level of randomness they want to introduce
1616
reordering on subsets of tests. Tests can be rerun in a specific order by passing a seed value reported
1717
in a previous test run.
1818

19+
.. image:: ./docs/pytest-random-order-design.png
20+
1921
-----------
2022
Quick Start
2123
-----------
@@ -85,8 +87,16 @@ that causes problems you can look up the value in the test report and repeat the
8587
Design
8688
------
8789

90+
.. image:: ./docs/pytest-random-order-design.png
91+
8892
The plugin groups tests in buckets, shuffles them within buckets and then shuffles the buckets.
8993

94+
Given the test suite above, here are two of a few possible generated orders of tests:
95+
96+
.. image:: ./docs/pytest-random-order-example1.png
97+
98+
.. image:: ./docs/pytest-random-order-example2.png
99+
90100
You can choose from a few types of buckets:
91101

92102
class
@@ -116,6 +126,7 @@ global
116126
none
117127
Disable shuffling.
118128

129+
119130
If you have three buckets of tests ``A``, ``B``, and ``C`` with three tests ``1`` and ``2``, and ``3`` in each of them,
120131
then one of many potential orderings that non-global randomisation can produce could be:
121132

@@ -244,3 +255,16 @@ v0.8.0
244255
++++++
245256

246257
* pytest cache plugin's ``--failed-first`` works now.
258+
259+
-------
260+
Credits
261+
-------
262+
263+
* The shuffle icon in the diagram is by artist `Daniele De Santis`_ and it was found on
264+
`iconarchive`_.
265+
266+
* The diagram is drawn with `sketchboard.io`_
267+
268+
.. _Daniele De Santis: https://www.danieledesantis.net/
269+
.. _iconarchive: http://www.iconarchive.com/artist/danieledesantis.html
270+
.. _sketchboard.io: https://sketchboard.io/

docs/pytest-random-order-design.png

55.4 KB
Loading

docs/pytest-random-order-example1.png

15.2 KB
Loading

docs/pytest-random-order-example2.png

14.8 KB
Loading

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def read(fname):
1414

1515
setup(
1616
name='pytest-random-order',
17-
version='1.0.0',
17+
version='1.0.1',
1818
author='Jazeps Basko',
1919
author_email='[email protected]',
2020
maintainer='Jazeps Basko',

0 commit comments

Comments
 (0)