| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f307972 commit fd1da13
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,8 +34,7 @@ def input(filename, **kwargs): | |||
| 34 | 34 | ||
| 35 | 35 | @output_operator() | |
| 36 | 36 | def global_args(stream, *args): | |
| 37 | - """Add extra global command-line argument(s), e.g. ``-progress``. | ||
| 38 | - """ | ||
| 37 | + """Add extra global command-line argument(s), e.g. ``-progress``.""" | ||
| 39 | 38 | return GlobalNode(stream, global_args.__name__, args).stream() | |
| 40 | 39 | ||
| 41 | 40 | ||
@@ -50,8 +49,7 @@ def overwrite_output(stream): | |||
| 50 | 49 | ||
| 51 | 50 | @output_operator() | |
| 52 | 51 | def merge_outputs(*streams): | |
| 53 | - """Include all given outputs in one ffmpeg command line | ||
| 54 | - """ | ||
| 52 | + """Include all given outputs in one ffmpeg command line""" | ||
| 55 | 53 | return MergeOutputsNode(streams, merge_outputs.__name__).stream() | |
| 56 | 54 | ||
| 57 | 55 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -88,8 +88,8 @@ def _allocate_filter_stream_names(filter_nodes, outgoing_edge_maps, stream_name_ | |||
| 88 | 88 | if len(downstreams) > 1: | |
| 89 | 89 | # TODO: automatically insert `splits` ahead of time via graph transformation. | |
| 90 | 90 | raise ValueError( | |
| 91 | - 'Encountered {} with multiple outgoing edges with same upstream label {!r}; a ' | ||
| 92 | - '`split` filter is probably required'.format( | ||
| 91 | + 'Encountered {} with multiple outgoing edges with same upstream ' | ||
| 92 | + 'label {!r}; a `split` filter is probably required'.format( | ||
| 93 | 93 | upstream_node, upstream_label | |
| 94 | 94 | ) | |
| 95 | 95 | ) | |
@@ -199,7 +199,7 @@ def run_async( | |||
| 199 | 199 | pipe_stderr=False, | |
| 200 | 200 | quiet=False, | |
| 201 | 201 | overwrite_output=False, | |
| 202 | - cwd=None | ||
| 202 | + cwd=None, | ||
| 203 | 203 | ): | |
| 204 | 204 | """Asynchronously invoke ffmpeg for the supplied node graph. | |
| 205 | 205 | ||
@@ -286,8 +286,11 @@ def run_async( | |||
| 286 | 286 | stderr_stream = subprocess.STDOUT | |
| 287 | 287 | stdout_stream = subprocess.DEVNULL | |
| 288 | 288 | return subprocess.Popen( | |
| 289 | - args, stdin=stdin_stream, stdout=stdout_stream, stderr=stderr_stream, | ||
| 290 | - cwd=cwd | ||
| 289 | + args, | ||
| 290 | + stdin=stdin_stream, | ||
| 291 | + stdout=stdout_stream, | ||
| 292 | + stderr=stderr_stream, | ||
| 293 | + cwd=cwd, | ||
| 291 | 294 | ) | |
| 292 | 295 | ||
| 293 | 296 | ||
@@ -300,7 +303,7 @@ def run( | |||
| 300 | 303 | input=None, | |
| 301 | 304 | quiet=False, | |
| 302 | 305 | overwrite_output=False, | |
| 303 | - cwd=None | ||
| 306 | + cwd=None, | ||
| 304 | 307 | ): | |
| 305 | 308 | """Invoke ffmpeg for the supplied node graph. | |
| 306 | 309 | ||
@@ -324,7 +327,7 @@ def run( | |||
| 324 | 327 | pipe_stderr=capture_stderr, | |
| 325 | 328 | quiet=quiet, | |
| 326 | 329 | overwrite_output=overwrite_output, | |
| 327 | - cwd=cwd | ||
| 330 | + cwd=cwd, | ||
| 328 | 331 | ) | |
| 329 | 332 | out, err = process.communicate(input) | |
| 330 | 333 | retcode = process.poll() | |
@@ -333,4 +336,10 @@ def run( | |||
| 333 | 336 | return out, err | |
| 334 | 337 | ||
| 335 | 338 | ||
| 336 | - __all__ = ['compile', 'Error', 'get_args', 'run', 'run_async'] | ||
| 339 | + __all__ = [ | ||
| 340 | + 'compile', | ||
| 341 | + 'Error', | ||
| 342 | + 'get_args', | ||
| 343 | + 'run', | ||
| 344 | + 'run_async', | ||
| 345 | + ] | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -49,8 +49,8 @@ class basestring(with_metaclass(BaseBaseString)): | |||
| 49 | 49 | def _recursive_repr(item): | |
| 50 | 50 | """Hack around python `repr` to deterministically represent dictionaries. | |
| 51 | 51 | ||
| 52 | - This is able to represent more things than json.dumps, since it does not require things to be JSON serializable | ||
| 53 | - (e.g. datetimes). | ||
| 52 | + This is able to represent more things than json.dumps, since it does not require | ||
| 53 | + things to be JSON serializable (e.g. datetimes). | ||
| 54 | 54 | """ | |
| 55 | 55 | if isinstance(item, basestring): | |
| 56 | 56 | result = str(item) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,8 +35,8 @@ def view(stream_spec, detail=False, filename=None, pipe=False, **kwargs): | |||
| 35 | 35 | import graphviz | |
| 36 | 36 | except ImportError: | |
| 37 | 37 | raise ImportError( | |
| 38 | - 'failed to import graphviz; please make sure graphviz is installed (e.g. `pip install ' | ||
| 39 | - 'graphviz`)' | ||
| 38 | + 'failed to import graphviz; please make sure graphviz is installed (e.g. ' | ||
| 39 | + '`pip install graphviz`)' | ||
| 40 | 40 | ) | |
| 41 | 41 | ||
| 42 | 42 | show_labels = kwargs.pop('show_labels', True) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,46 +9,55 @@ class DagNode(object): | |||
| 9 | 9 | """Node in a directed-acyclic graph (DAG). | |
| 10 | 10 | ||
| 11 | 11 | Edges: | |
| 12 | - DagNodes are connected by edges. An edge connects two nodes with a label for each side: | ||
| 12 | + DagNodes are connected by edges. An edge connects two nodes with a label for | ||
| 13 | + each side: | ||
| 13 | 14 | - ``upstream_node``: upstream/parent node | |
| 14 | 15 | - ``upstream_label``: label on the outgoing side of the upstream node | |
| 15 | 16 | - ``downstream_node``: downstream/child node | |
| 16 | 17 | - ``downstream_label``: label on the incoming side of the downstream node | |
| 17 | 18 | ||
| 18 | - For example, DagNode A may be connected to DagNode B with an edge labelled "foo" on A's side, and "bar" on B's | ||
| 19 | - side: | ||
| 19 | + For example, DagNode A may be connected to DagNode B with an edge labelled | ||
| 20 | + "foo" on A's side, and "bar" on B's side: | ||
| 20 | 21 | ||
| 21 | 22 | _____ _____ | |
| 22 | 23 | | | | | | |
| 23 | 24 | | A >[foo]---[bar]> B | | |
| 24 | 25 | |_____| |_____| | |
| 25 | 26 | ||
| 26 | - Edge labels may be integers or strings, and nodes cannot have more than one incoming edge with the same label. | ||
| 27 | + Edge labels may be integers or strings, and nodes cannot have more than one | ||
| 28 | + incoming edge with the same label. | ||
| 27 | 29 | ||
| 28 | - DagNodes may have any number of incoming edges and any number of outgoing edges. DagNodes keep track only of | ||
| 29 | - their incoming edges, but the entire graph structure can be inferred by looking at the furthest downstream | ||
| 30 | - nodes and working backwards. | ||
| 30 | + DagNodes may have any number of incoming edges and any number of outgoing | ||
| 31 | + edges. DagNodes keep track only of their incoming edges, but the entire graph | ||
| 32 | + structure can be inferred by looking at the furthest downstream nodes and | ||
| 33 | + working backwards. | ||
| 31 | 34 | ||
| 32 | 35 | Hashing: | |
| 33 | - DagNodes must be hashable, and two nodes are considered to be equivalent if they have the same hash value. | ||
| 36 | + DagNodes must be hashable, and two nodes are considered to be equivalent if | ||
| 37 | + they have the same hash value. | ||
| 34 | 38 | ||
| 35 | - Nodes are immutable, and the hash should remain constant as a result. If a node with new contents is required, | ||
| 36 | - create a new node and throw the old one away. | ||
| 39 | + Nodes are immutable, and the hash should remain constant as a result. If a | ||
| 40 | + node with new contents is required, create a new node and throw the old one | ||
| 41 | + away. | ||
| 37 | 42 | ||
| 38 | 43 | String representation: | |
| 39 | - In order for graph visualization tools to show useful information, nodes must be representable as strings. The | ||
| 40 | - ``repr`` operator should provide a more or less "full" representation of the node, and the ``short_repr`` | ||
| 41 | - property should be a shortened, concise representation. | ||
| 44 | + In order for graph visualization tools to show useful information, nodes must | ||
| 45 | + be representable as strings. The ``repr`` operator should provide a more or | ||
| 46 | + less "full" representation of the node, and the ``short_repr`` property should | ||
| 47 | + be a shortened, concise representation. | ||
| 42 | 48 | ||
| 43 | - Again, because nodes are immutable, the string representations should remain constant. | ||
| 49 | + Again, because nodes are immutable, the string representations should remain | ||
| 50 | + constant. | ||
| 44 | 51 | """ | |
| 45 | 52 | ||
| 46 | 53 | def __hash__(self): | |
| 47 | 54 | """Return an integer hash of the node.""" | |
| 48 | 55 | raise NotImplementedError() | |
| 49 | 56 | ||
| 50 | 57 | def __eq__(self, other): | |
| 51 | - """Compare two nodes; implementations should return True if (and only if) hashes match.""" | ||
| 58 | + """Compare two nodes; implementations should return True if (and only if) | ||
| 59 | + hashes match. | ||
| 60 | + """ | ||
| 52 | 61 | raise NotImplementedError() | |
| 53 | 62 | ||
| 54 | 63 | def __repr__(self, other): | |
@@ -64,8 +73,9 @@ def short_repr(self): | |||
| 64 | 73 | def incoming_edge_map(self): | |
| 65 | 74 | """Provides information about all incoming edges that connect to this node. | |
| 66 | 75 | ||
| 67 | - The edge map is a dictionary that maps an ``incoming_label`` to ``(outgoing_node, outgoing_label)``. Note that | ||
| 68 | - implicity, ``incoming_node`` is ``self``. See "Edges" section above. | ||
| 76 | + The edge map is a dictionary that maps an ``incoming_label`` to | ||
| 77 | + ``(outgoing_node, outgoing_label)``. Note that implicity, ``incoming_node`` is | ||
| 78 | + ``self``. See "Edges" section above. | ||
| 69 | 79 | """ | |
| 70 | 80 | raise NotImplementedError() | |
| 71 | 81 | ||
@@ -116,8 +126,7 @@ def get_outgoing_edges(upstream_node, outgoing_edge_map): | |||
| 116 | 126 | ||
| 117 | 127 | ||
| 118 | 128 | class KwargReprNode(DagNode): | |
| 119 | - """A DagNode that can be represented as a set of args+kwargs. | ||
| 120 | - """ | ||
| 129 | + """A DagNode that can be represented as a set of args+kwargs.""" | ||
| 121 | 130 | ||
| 122 | 131 | @property | |
| 123 | 132 | def __upstream_hashes(self): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,7 +21,9 @@ def _get_types_str(types): | |||
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | 23 | class Stream(object): | |
| 24 | - """Represents the outgoing edge of an upstream node; may be used to create more downstream nodes.""" | ||
| 24 | + """Represents the outgoing edge of an upstream node; may be used to create more | ||
| 25 | + downstream nodes. | ||
| 26 | + """ | ||
| 25 | 27 | ||
| 26 | 28 | def __init__( | |
| 27 | 29 | self, upstream_node, upstream_label, node_types, upstream_selector=None | |
@@ -214,9 +216,10 @@ def stream(self, label=None, selector=None): | |||
| 214 | 216 | return self.__outgoing_stream_type(self, label, upstream_selector=selector) | |
| 215 | 217 | ||
| 216 | 218 | def __getitem__(self, item): | |
| 217 | - """Create an outgoing stream originating from this node; syntactic sugar for ``self.stream(label)``. | ||
| 218 | - It can also be used to apply a selector: e.g. ``node[0:'a']`` returns a stream with label 0 and | ||
| 219 | - selector ``'a'``, which is the same as ``node.stream(label=0, selector='a')``. | ||
| 219 | + """Create an outgoing stream originating from this node; syntactic sugar for | ||
| 220 | + ``self.stream(label)``. It can also be used to apply a selector: e.g. | ||
| 221 | + ``node[0:'a']`` returns a stream with label 0 and selector ``'a'``, which is | ||
| 222 | + the same as ``node.stream(label=0, selector='a')``. | ||
| 220 | 223 | ||
| 221 | 224 | Example: | |
| 222 | 225 | Process the audio and video portions of a stream independently:: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -116,9 +116,20 @@ def test_stream_repr(): | |||
| 116 | 116 | dummy_out.label, dummy_out.node.short_hash | |
| 117 | 117 | ) | |
| 118 | 118 | ||
| 119 | + | ||
| 119 | 120 | def test_repeated_args(): | |
| 120 | - out_file = ffmpeg.input('dummy.mp4').output('dummy2.mp4', streamid=['0:0x101', '1:0x102']) | ||
| 121 | - assert out_file.get_args() == ['-i', 'dummy.mp4', '-streamid', '0:0x101', '-streamid', '1:0x102', 'dummy2.mp4'] | ||
| 121 | + out_file = ffmpeg.input('dummy.mp4').output( | ||
| 122 | + 'dummy2.mp4', streamid=['0:0x101', '1:0x102'] | ||
| 123 | + ) | ||
| 124 | + assert out_file.get_args() == [ | ||
| 125 | + '-i', | ||
| 126 | + 'dummy.mp4', | ||
| 127 | + '-streamid', | ||
| 128 | + '0:0x101', | ||
| 129 | + '-streamid', | ||
| 130 | + '1:0x102', | ||
| 131 | + 'dummy2.mp4', | ||
| 132 | + ] | ||
| 122 | 133 | ||
| 123 | 134 | ||
| 124 | 135 | def test__get_args__simple(): | |
@@ -332,8 +343,13 @@ def test_filter_asplit(): | |||
| 332 | 343 | '-i', | |
| 333 | 344 | TEST_INPUT_FILE1, | |
| 334 | 345 | '-filter_complex', | |
| 335 | - '[0]vflip[s0];[s0]asplit=2[s1][s2];[s1]atrim=end=20:start=10[s3];[s2]atrim=end=40:start=30[s4];[s3]' | ||
| 336 | - '[s4]concat=n=2[s5]', | ||
| 346 | + ( | ||
| 347 | + '[0]vflip[s0];' | ||
| 348 | + '[s0]asplit=2[s1][s2];' | ||
| 349 | + '[s1]atrim=end=20:start=10[s3];' | ||
| 350 | + '[s2]atrim=end=40:start=30[s4];' | ||
| 351 | + '[s3][s4]concat=n=2[s5]' | ||
| 352 | + ), | ||
| 337 | 353 | '-map', | |
| 338 | 354 | '[s5]', | |
| 339 | 355 | TEST_OUTPUT_FILE1, | |
@@ -357,10 +373,14 @@ def test__output__video_size(video_size): | |||
| 357 | 373 | ||
| 358 | 374 | ||
| 359 | 375 | def test_filter_normal_arg_escape(): | |
| 360 | - """Test string escaping of normal filter args (e.g. ``font`` param of ``drawtext`` filter).""" | ||
| 376 | + """Test string escaping of normal filter args (e.g. ``font`` param of ``drawtext`` | ||
| 377 | + filter). | ||
| 378 | + """ | ||
| 361 | 379 | ||
| 362 | 380 | def _get_drawtext_font_repr(font): | |
| 363 | - """Build a command-line arg using drawtext ``font`` param and extract the ``-filter_complex`` arg.""" | ||
| 381 | + """Build a command-line arg using drawtext ``font`` param and extract the | ||
| 382 | + ``-filter_complex`` arg. | ||
| 383 | + """ | ||
| 364 | 384 | args = ( | |
| 365 | 385 | ffmpeg.input('in') | |
| 366 | 386 | .drawtext('test', font='a{}b'.format(font)) | |
@@ -370,7 +390,9 @@ def _get_drawtext_font_repr(font): | |||
| 370 | 390 | assert args[:3] == ['-i', 'in', '-filter_complex'] | |
| 371 | 391 | assert args[4:] == ['-map', '[s0]', 'out'] | |
| 372 | 392 | match = re.match( | |
| 373 | - r'\[0\]drawtext=font=a((.|\n)*)b:text=test\[s0\]', args[3], re.MULTILINE | ||
| 393 | + r'\[0\]drawtext=font=a((.|\n)*)b:text=test\[s0\]', | ||
| 394 | + args[3], | ||
| 395 | + re.MULTILINE, | ||
| 374 | 396 | ) | |
| 375 | 397 | assert match is not None, 'Invalid -filter_complex arg: {!r}'.format(args[3]) | |
| 376 | 398 | return match.group(1) | |
@@ -394,10 +416,14 @@ def _get_drawtext_font_repr(font): | |||
| 394 | 416 | ||
| 395 | 417 | ||
| 396 | 418 | def test_filter_text_arg_str_escape(): | |
| 397 | - """Test string escaping of normal filter args (e.g. ``text`` param of ``drawtext`` filter).""" | ||
| 419 | + """Test string escaping of normal filter args (e.g. ``text`` param of ``drawtext`` | ||
| 420 | + filter). | ||
| 421 | + """ | ||
| 398 | 422 | ||
| 399 | 423 | def _get_drawtext_text_repr(text): | |
| 400 | - """Build a command-line arg using drawtext ``text`` param and extract the ``-filter_complex`` arg.""" | ||
| 424 | + """Build a command-line arg using drawtext ``text`` param and extract the | ||
| 425 | + ``-filter_complex`` arg. | ||
| 426 | + """ | ||
| 401 | 427 | args = ffmpeg.input('in').drawtext('a{}b'.format(text)).output('out').get_args() | |
| 402 | 428 | assert args[:3] == ['-i', 'in', '-filter_complex'] | |
| 403 | 429 | assert args[4:] == ['-map', '[s0]', 'out'] | |
@@ -447,8 +473,11 @@ def test__run_async(mocker, pipe_stdin, pipe_stdout, pipe_stderr, cwd): | |||
| 447 | 473 | popen__mock = mocker.patch.object(subprocess, 'Popen', return_value=process__mock) | |
| 448 | 474 | stream = _get_simple_example() | |
| 449 | 475 | process = ffmpeg.run_async( | |
| 450 | - stream, pipe_stdin=pipe_stdin, pipe_stdout=pipe_stdout, | ||
| 451 | - pipe_stderr=pipe_stderr, cwd=cwd | ||
| 476 | + stream, | ||
| 477 | + pipe_stdin=pipe_stdin, | ||
| 478 | + pipe_stdout=pipe_stdout, | ||
| 479 | + pipe_stderr=pipe_stderr, | ||
| 480 | + cwd=cwd, | ||
| 452 | 481 | ) | |
| 453 | 482 | assert process is process__mock | |
| 454 | 483 | ||
@@ -458,8 +487,10 @@ def test__run_async(mocker, pipe_stdin, pipe_stdout, pipe_stderr, cwd): | |||
| 458 | 487 | (args,), kwargs = popen__mock.call_args | |
| 459 | 488 | assert args == ffmpeg.compile(stream) | |
| 460 | 489 | assert kwargs == dict( | |
| 461 | - stdin=expected_stdin, stdout=expected_stdout, stderr=expected_stderr, | ||
| 462 | - cwd=cwd | ||
| 490 | + stdin=expected_stdin, | ||
| 491 | + stdout=expected_stdout, | ||
| 492 | + stderr=expected_stderr, | ||
| 493 | + cwd=cwd, | ||
| 463 | 494 | ) | |
| 464 | 495 | ||
| 465 | 496 | ||
@@ -695,7 +726,10 @@ def test_pipe(): | |||
| 695 | 726 | ||
| 696 | 727 | cmd = ['ffmpeg'] + args | |
| 697 | 728 | p = subprocess.Popen( | |
| 698 | - cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE | ||
| 729 | + cmd, | ||
| 730 | + stdin=subprocess.PIPE, | ||
| 731 | + stdout=subprocess.PIPE, | ||
| 732 | + stderr=subprocess.PIPE, | ||
| 699 | 733 | ) | |
| 700 | 734 | ||
| 701 | 735 | in_data = bytes( | |
@@ -715,10 +749,10 @@ def test__probe(): | |||
| 715 | 749 | assert data['format']['duration'] == '7.036000' | |
| 716 | 750 | ||
| 717 | 751 | ||
| 718 | - @pytest.mark.skipif(sys.version_info < (3, 3), reason="requires python3.3 or higher") | ||
| 752 | + @pytest.mark.skipif(sys.version_info < (3, 3), reason='requires python3.3 or higher') | ||
| 719 | 753 | def test__probe_timeout(): | |
| 720 | 754 | with pytest.raises(subprocess.TimeoutExpired) as excinfo: | |
| 721 | - data = ffmpeg.probe(TEST_INPUT_FILE1, timeout=0) | ||
| 755 | + ffmpeg.probe(TEST_INPUT_FILE1, timeout=0) | ||
| 722 | 756 | assert 'timed out after 0 seconds' in str(excinfo.value) | |
| 723 | 757 | ||
| 724 | 758 | ||
@@ -751,24 +785,24 @@ def get_filter_complex_outputs(flt, name): | |||
| 751 | 785 | ||
| 752 | 786 | ||
| 753 | 787 | def test__get_filter_complex_input(): | |
| 754 | - assert get_filter_complex_input("", "scale") is None | ||
| 755 | - assert get_filter_complex_input("scale", "scale") is None | ||
| 756 | - assert get_filter_complex_input("scale[s3][s4];etc", "scale") is None | ||
| 757 | - assert get_filter_complex_input("[s2]scale", "scale") == "s2" | ||
| 758 | - assert get_filter_complex_input("[s2]scale;etc", "scale") == "s2" | ||
| 759 | - assert get_filter_complex_input("[s2]scale[s3][s4];etc", "scale") == "s2" | ||
| 788 | + assert get_filter_complex_input('', 'scale') is None | ||
| 789 | + assert get_filter_complex_input('scale', 'scale') is None | ||
| 790 | + assert get_filter_complex_input('scale[s3][s4];etc', 'scale') is None | ||
| 791 | + assert get_filter_complex_input('[s2]scale', 'scale') == 's2' | ||
| 792 | + assert get_filter_complex_input('[s2]scale;etc', 'scale') == 's2' | ||
| 793 | + assert get_filter_complex_input('[s2]scale[s3][s4];etc', 'scale') == 's2' | ||
| 760 | 794 | ||
| 761 | 795 | ||
| 762 | 796 | def test__get_filter_complex_outputs(): | |
| 763 | - assert get_filter_complex_outputs("", "scale") is None | ||
| 764 | - assert get_filter_complex_outputs("scale", "scale") is None | ||
| 765 | - assert get_filter_complex_outputs("scalex[s0][s1]", "scale") is None | ||
| 766 | - assert get_filter_complex_outputs("scale[s0][s1]", "scale") == ['s0', 's1'] | ||
| 767 | - assert get_filter_complex_outputs("[s5]scale[s0][s1]", "scale") == ['s0', 's1'] | ||
| 768 | - assert get_filter_complex_outputs("[s5]scale[s1][s0]", "scale") == ['s1', 's0'] | ||
| 769 | - assert get_filter_complex_outputs("[s5]scale[s1]", "scale") == ['s1'] | ||
| 770 | - assert get_filter_complex_outputs("[s5]scale[s1];x", "scale") == ['s1'] | ||
| 771 | - assert get_filter_complex_outputs("y;[s5]scale[s1];x", "scale") == ['s1'] | ||
| 797 | + assert get_filter_complex_outputs('', 'scale') is None | ||
| 798 | + assert get_filter_complex_outputs('scale', 'scale') is None | ||
| 799 | + assert get_filter_complex_outputs('scalex[s0][s1]', 'scale') is None | ||
| 800 | + assert get_filter_complex_outputs('scale[s0][s1]', 'scale') == ['s0', 's1'] | ||
| 801 | + assert get_filter_complex_outputs('[s5]scale[s0][s1]', 'scale') == ['s0', 's1'] | ||
| 802 | + assert get_filter_complex_outputs('[s5]scale[s1][s0]', 'scale') == ['s1', 's0'] | ||
| 803 | + assert get_filter_complex_outputs('[s5]scale[s1]', 'scale') == ['s1'] | ||
| 804 | + assert get_filter_complex_outputs('[s5]scale[s1];x', 'scale') == ['s1'] | ||
| 805 | + assert get_filter_complex_outputs('y;[s5]scale[s1];x', 'scale') == ['s1'] | ||
| 772 | 806 | ||
| 773 | 807 | ||
| 774 | 808 | def test__multi_output_edge_label_order(): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments