Skip to content

Commit eb268e4

Browse files
committed
fix mike's comments
1 parent 02fa7fd commit eb268e4

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

pytest_fixture_tools/plugin.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,12 @@ def _show_fixture_duplicates_main(config, session):
121121

122122
def pytest_runtest_setup(item):
123123
if item.config.option.fixture_graph and hasattr(item, "_fixtureinfo"):
124-
curdir = py.path.local()
125124
# fixtures came from function parameters names
126125
data = dict()
127126
data['func_args'] = item._fixtureinfo.argnames, 'red'
128127
for fixture_name, fixture_data in list(item._fixtureinfo.name2fixturedefs.items()):
129128

130-
loc = getlocation(fixture_data[0].func, curdir)
131-
if 'pytest_vgw' in loc:
132-
color = 'yellow'
133-
else:
134-
color = 'green'
129+
color = 'green'
135130
data[fixture_name] = fixture_data[0].argnames, color
136131

137132
graph = pydot.Dot(graph_type='digraph')
@@ -155,7 +150,7 @@ def pytest_runtest_setup(item):
155150
graph.write("{}.{}".format(filename, output_type), format=output_type)
156151
tw.line("created {}.{}.".format(filename, output_type))
157152
except Exception:
158-
tw.line("grpahvis wasn't found in PATH")
153+
tw.line("graphvis wasn't found in PATH")
159154
graph.write(filename + ".dot")
160155
tw.line("created {}.dot.".format(filename))
161156
tw.line("You can convert it to a PNG using:\n\t'dot -Tpng {0}.dot -o {0}.png'".format(filename))

0 commit comments

Comments
 (0)