@@ -22,6 +22,9 @@ Installation
22
22
Usage
23
23
-----
24
24
25
+ show-fixture-duplicates
26
+ ***********************
27
+
25
28
If you have already installed ``pytest-fixture-tools `` plugin then you can use one of its commands.
26
29
27
30
``--show-fixture-duplicates `` - will collect all fixtures and print you a list of duplicates for each fixture.
@@ -47,16 +50,27 @@ Output can look like this:
47
50
tests/fixtures/order.py:30
48
51
tests/unit/api/conftest.py:261
49
52
50
- You can also generate the usage fixture graph like that:
53
+ fixture-graph
54
+ *************
55
+
56
+ You can generate the usage fixture graph like that:
57
+
58
+ .. sourcecode :: bash
51
59
52
- .. sourcecode ::
53
60
# on windows gitbash as example
54
61
export PATH=$PATH:/c/Program\ Files\ \( x86\) /Graphviz2.38/bin/
55
62
pytest --fixture-graph -s
56
63
57
- The Output would be like that:
64
+ # or you can select the output direcotry like that:
65
+ pytest --fixture-graph --fixture-graph-output-dir=./test_output
66
+
67
+ # you can also change the output type of the graphs (any of graphvis supported outputs types):
68
+ pytest --fixture-graph --fixture-graph-type=jpg
69
+
70
+ The output would be like that:
58
71
59
72
.. sourcecode ::
73
+
60
74
============================= test session starts =============================
61
75
platform win32 -- Python 2.7.10, pytest-3.3.1, py-1.5.2, pluggy-0.6.0
62
76
rootdir: C:\U sers\i fruchte\P rojects\p ytest-fixture-tools, inifile: tox.ini
@@ -81,11 +95,10 @@ The Output would be like that:
81
95
82
96
===================== 6 passed, 1 skipped in 0.29 seconds =====================
83
97
84
- would provide this output, that can help under a test that depend on large amount of fixtures:
98
+ Final output, that can help with tests that depend on large amount of fixtures:
85
99
86
100
.. image :: imgs/graph_example.png
87
101
:alt: alternate text
88
- :align: right
89
102
90
103
Contact
91
104
-------
0 commit comments