Returns True if PyDot and Graphviz are available.
()
| 41 | |
| 42 | |
| 43 | def check_pydot(): |
| 44 | """Returns True if PyDot and Graphviz are available.""" |
| 45 | if pydot is None: |
| 46 | return False |
| 47 | try: |
| 48 | # Attempt to create an image of a blank graph |
| 49 | # to check the pydot/graphviz installation. |
| 50 | pydot.Dot.create(pydot.Dot()) |
| 51 | return True |
| 52 | except OSError: |
| 53 | return False |
| 54 | |
| 55 | |
| 56 | def is_wrapped_model(layer): |
no test coverage detected