(tmpdir, format, typ)
| 253 | strict=False, |
| 254 | ) |
| 255 | def test_dot_graph(tmpdir, format, typ): |
| 256 | # Use a name that the shell would interpret specially to ensure that we're |
| 257 | # not vulnerable to shell injection when interacting with `dot`. |
| 258 | filename = str(tmpdir.join("$(touch should_not_get_created.txt)")) |
| 259 | |
| 260 | target = ".".join([filename, format]) |
| 261 | ensure_not_exists(target) |
| 262 | try: |
| 263 | result = dot_graph(dsk, filename=filename, format=format) |
| 264 | |
| 265 | assert not os.path.exists("should_not_get_created.txt") |
| 266 | assert os.path.isfile(target) |
| 267 | assert isinstance(result, typ) |
| 268 | finally: |
| 269 | ensure_not_exists(target) |
| 270 | |
| 271 | |
| 272 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected