Skip to content

Commit 2c8d06e

Browse files
authored
Fix --fixture-graph-output-dir and --fixture-graph-output-type
Command line options `--fixture-graph-output-dir` and `--fixture-graph-output-type` wouldn't allow you to actually pass custom value, since their action was to store a boolean: ``` $ pytest --fixture-graph --fixture-graph-output-type=pdf ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...] pytest: error: argument --fixture-graph-output-type: ignored explicit argument 'pdf' $ pytest --fixture-graph --fixture-graph-output-dir=./foo ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...] pytest: error: argument --fixture-graph-output-dir: ignored explicit argument './foo' ```
1 parent 49d2ee7 commit 2c8d06e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytest_fixture_tools/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ def pytest_addoption(parser):
3737
action="store_true", dest="fixture_graph", default=False,
3838
help="create .dot fixture graph for each test")
3939
group.addoption('--fixture-graph-output-dir',
40-
action="store_true", dest="fixture_graph_output_dir", default="artifacts",
40+
action="store", dest="fixture_graph_output_dir", default="artifacts",
4141
help="select the location for the output of fixture graph. defaults to 'artifacts'")
4242
group.addoption('--fixture-graph-output-type',
43-
action="store_true", dest="fixture_graph_output_type", default="png",
43+
action="store", dest="fixture_graph_output_type", default="png",
4444
help="select the type of the output for the fixture graph. defaults to 'png'")
4545

4646

0 commit comments

Comments
 (0)