@@ -26,7 +26,7 @@ def test_get_node_color_with_real_nodes() -> None:
2626 try :
2727 import graphviz # type: ignore # noqa: F401
2828
29- result = view (output , format = "dot" )
29+ result = view (output . node , format = "dot" )
3030 assert isinstance (result , str )
3131 except ImportError :
3232 pytest .skip ("graphviz not installed" )
@@ -41,12 +41,12 @@ def test_view_requires_graphviz() -> None:
4141 import graphviz # type: ignore # noqa: F401
4242
4343 # If graphviz is available, test that view works
44- result = view (output , format = "dot" )
44+ result = view (output . node , format = "dot" )
4545 assert isinstance (result , str )
4646 except ImportError :
4747 # If graphviz is not available, test that view raises ImportError
4848 with pytest .raises (ImportError ) as exc_info :
49- view (output , format = "dot" )
49+ view (output . node , format = "dot" )
5050 assert "graphviz" in str (exc_info .value ).lower ()
5151
5252
@@ -56,7 +56,7 @@ def test_view_with_simple_graph() -> None:
5656 import graphviz # type: ignore # noqa: F401
5757
5858 output = ffmpeg .input ("input.mp4" ).output (filename = "output.mp4" )
59- result = view (output , format = "dot" )
59+ result = view (output . node , format = "dot" )
6060 assert isinstance (result , str )
6161 except ImportError :
6262 pytest .skip ("graphviz not installed" )
@@ -69,11 +69,11 @@ def test_view_with_filter_chain() -> None:
6969
7070 output = (
7171 ffmpeg .input ("input.mp4" )
72- .filter ( " scale" , 1280 , 720 )
73- .filter ( " fps" , fps = 30 )
72+ .video . scale ( w = 1280 , h = 720 )
73+ .fps ( fps = 30 )
7474 .output (filename = "output.mp4" )
7575 )
76- result = view (output , format = "dot" )
76+ result = view (output . node , format = "dot" )
7777 assert isinstance (result , str )
7878 except ImportError :
7979 pytest .skip ("graphviz not installed" )
@@ -87,8 +87,13 @@ def test_view_format_options() -> None:
8787 output = ffmpeg .input ("input.mp4" ).output (filename = "output.mp4" )
8888
8989 # Test different format options
90- for fmt in ["png" , "svg" , "dot" ]:
91- result = view (output , format = fmt )
92- assert isinstance (result , str )
90+ result = view (output .node , format = "png" )
91+ assert isinstance (result , str )
92+
93+ result = view (output .node , format = "svg" )
94+ assert isinstance (result , str )
95+
96+ result = view (output .node , format = "dot" )
97+ assert isinstance (result , str )
9398 except ImportError :
9499 pytest .skip ("graphviz not installed" )
0 commit comments