(tmpdir, format, typ)
| 230 | ], |
| 231 | ) |
| 232 | def test_dot_graph(tmpdir, format, typ): |
| 233 | # Use a name that the shell would interpret specially to ensure that we're |
| 234 | # not vulnerable to shell injection when interacting with `dot`. |
| 235 | filename = str(tmpdir.join("$(touch should_not_get_created.txt)")) |
| 236 | |
| 237 | target = ".".join([filename, format]) |
| 238 | ensure_not_exists(target) |
| 239 | try: |
| 240 | result = dot_graph(dsk, filename=filename, format=format) |
| 241 | |
| 242 | assert not os.path.exists("should_not_get_created.txt") |
| 243 | assert os.path.isfile(target) |
| 244 | assert isinstance(result, typ) |
| 245 | finally: |
| 246 | ensure_not_exists(target) |
| 247 | |
| 248 | |
| 249 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected
searching dependent graphs…