repo_id string | cross_repo_split string | commit_index int32 | commit_sha string | in_repo_split string | test_file string | file_split string | split_group string | lineno int32 | col_offset int32 | assertion_type string | test_function string | prefix large_string | target string | assertion_event_type string | assertion_event_id string | assertion_anchor large_string | old_target string | old_lineno int32 | old_col_offset int32 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
xflr6/graphviz | train | 42 | 7a82498092454f1c9a4cdb4a85f96fad5707827f | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 54 | 4 | assert | test_attr_kw_none | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)))
def classes(request):
return request.param
def ... | 'graph {\n\tspam=eggs\n}' | modified | c2ce974dd9a5bb1f877c09603949169cc4a4f0f7e5aa84387e03f2584341f564 | assert|test_attr_kw_none|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2))) def classes(request): return request.para... | 'graph {\n\tspam=eggs\n}' | 54 | 4 |
xflr6/graphviz | train | 42 | 7a82498092454f1c9a4cdb4a85f96fad5707827f | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 72 | 9 | pytest.raises | test_subgraph_mixed | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)))
def classes(request):
return request.param
def ... | ValueError) | modified | 8a401f2708c8b6b6acc1dbf09f8bb7a8d46a47e1fdd754d28ba7b8e9753c257d | pytest.raises|test_subgraph_mixed|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2))) def classes(request): return req... | ValueError) | 72 | 9 |
xflr6/graphviz | train | 43 | 316a7b128bc99d4a659fb70027c92e7be2464fcf | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 60 | 4 | assert | test_render | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError) as e:
render('', 'pdf', 'nonfilepath')
e.match(r'engine')
def test_render_format_unknown():
with ... | str(rendered) | modified | e378a07d75fd342907c0359c567045cf96a7c1de4ad4183e708e2cedd39b6e4d | assert|test_render|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError) as e: render('', 'pdf', 'nonfilepath') e.match(r'engine') def test_render_format_unknown(): with pytest.r... | str(rendered) | 60 | 4 |
xflr6/graphviz | train | 43 | 316a7b128bc99d4a659fb70027c92e7be2464fcf | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 71 | 9 | pytest.raises | test_pipe_invalid_data | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError) as e:
render('', 'pdf', 'nonfilepath')
e.match(r'engine')
def test_render_format_unknown():
with ... | subprocess.CalledProcessError) | modified | 1a1a28683f4aa6795ee0764d2f08880fcfe6296678f1dedd847f5310173bfa42 | pytest.raises|test_pipe_invalid_data|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError) as e: render('', 'pdf', 'nonfilepath') e.match(r'engine') def test_render_format_unknow... | subprocess.CalledProcessError) | 71 | 9 |
xflr6/graphviz | train | 43 | 316a7b128bc99d4a659fb70027c92e7be2464fcf | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 91 | 8 | assert_* | test_pipe_mocked_fail | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError) as e:
render('', 'pdf', 'nonfilepath')
e.match(r'engine')
def test_render_format_unknown():
with ... | mocker.sentinel.errs) | added | 74e89f4ae3f837da4ac9df8a66f043c1f727e98e786d69c337ed8ad7ff2e80a0 | assert_*|test_pipe_mocked_fail|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError) as e: render('', 'pdf', 'nonfilepath') e.match(r'engine') def test_render_format_unknown(): w... | null | null | null |
xflr6/graphviz | train | 43 | 316a7b128bc99d4a659fb70027c92e7be2464fcf | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 122 | 12 | assert_* | test_view | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError) as e:
render('', 'pdf', 'nonfilepath')
e.match(r'engine')
def test_render_format_unknown():
with ... | ['open', 'nonfilepath']) | added | 3271f672805847826c433bea49ca6c8da983898441699d7218fa1d6f3138c9ea | assert_*|test_view|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError) as e: render('', 'pdf', 'nonfilepath') e.match(r'engine') def test_render_format_unknown(): with pytest.r... | null | null | null |
xflr6/graphviz | train | 43 | 316a7b128bc99d4a659fb70027c92e7be2464fcf | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 95 | 4 | assert | test_save | # test_files.py
import pytest
from graphviz.files import File, Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURC... | source.filename == filename and source.directory == directory | modified | 23ba7df506376544fdb2abe9c548b8824df34899494cacece503d94a5d56525e | assert|test_save|# test_files.py import pytest from graphviz.files import File, Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) d... | source.filename == filename and source.directory == directory | 95 | 4 |
xflr6/graphviz | train | 43 | 316a7b128bc99d4a659fb70027c92e7be2464fcf | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 115 | 4 | assert_* | test_render | # test_files.py
import pytest
from graphviz.files import File, Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURC... | source.format) | modified | 065e6014406c8d81542c388ee9e7db07b4505ab08b61a8dab68464879fa22a3f | assert_*|test_render|# test_files.py import pytest from graphviz.files import File, Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURC... | source.format) | 117 | 4 |
xflr6/graphviz | train | 43 | 316a7b128bc99d4a659fb70027c92e7be2464fcf | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 130 | 13 | pytest.raises | test__view | # test_files.py
import pytest
from graphviz.files import File, Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURC... | RuntimeError) | modified | 346665345cce2fa9ea1071aa2efb3d695c180b8a9d8f9c99dd43f478c58a2b3c | pytest.raises|test__view|# test_files.py import pytest from graphviz.files import File, Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**S... | RuntimeError) | 132 | 13 |
xflr6/graphviz | train | 43 | 316a7b128bc99d4a659fb70027c92e7be2464fcf | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 142 | 4 | assert | test_copy | # test_files.py
import pytest
from graphviz.files import File, Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURC... | source | modified | 21d39eef657575979ed087e3a385b0c44d26d24487513bd4c00c1a7587790bf0 | assert|test_copy|# test_files.py import pytest from graphviz.files import File, Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) d... | source | 144 | 4 |
xflr6/graphviz | train | 44 | 6632b9247a5bcd4d7c29e530d08d3e62135a4b73 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 42 | 9 | pytest.raises | test_iter_subgraph_strict | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)))
def classes(request):
return request.param
def ... | ValueError) | added | 150cf71c2045361b90fe029170d5c9f7be06cd068cd07a85e584aec727f27b5a | pytest.raises|test_iter_subgraph_strict|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2))) def classes(request): retu... | null | null | null |
xflr6/graphviz | train | 44 | 6632b9247a5bcd4d7c29e530d08d3e62135a4b73 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 68 | 4 | assert | test_subgraph_graph_none | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)))
def classes(request):
return request.param
def ... | 'graph {\n\t// comment\n\tsubgraph name {\n\t}\n}' | added | 97d046f4a89cb440023bdf4f56052b622d39744c446dbe6625ae91a86314a503 | assert|test_subgraph_graph_none|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2))) def classes(request): return reque... | null | null | null |
xflr6/graphviz | train | 44 | 6632b9247a5bcd4d7c29e530d08d3e62135a4b73 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 79 | 9 | pytest.raises | test_subgraph_mixed | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)))
def classes(request):
return request.param
def ... | ValueError) | added | 65c95006a6beb45672c44b73a06af9c704302c89634017248b7edd0a2da5a32b | pytest.raises|test_subgraph_mixed|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2))) def classes(request): return req... | null | null | null |
xflr6/graphviz | train | 44 | 6632b9247a5bcd4d7c29e530d08d3e62135a4b73 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 111 | 4 | assert | test_subgraph | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)))
def classes(request):
return request.param
def ... | '''graph { { A B C A -- B [constraint=false] A -- C B -- C } { D E F D -- E [constraint=false] D -- F E -- F } edge [style=dashed] A -- D B -- E C -- F }''' | added | 7dae99b1d61d8d0124c4454dff54e59c56f206ce4f4622b2f7cea596a53c96c9 | assert|test_subgraph|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2))) def classes(request): return request.param de... | null | null | null |
xflr6/graphviz | train | 45 | c87252e4e41eaf1ddbcde9fa2e5fe28fd81302b1 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 62 | 9 | pytest.raises | test_pipe_missingdot | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError) as e:
render('', 'pdf', 'nonfilepath')
e.match(r'engine')
def test_render_format_unknown():
with ... | ExecutableNotFound) | added | 69a8649227196952f71d017b72f9745c3f564780bfb1fff9a0c34e2752f49b13 | pytest.raises|test_pipe_missingdot|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError) as e: render('', 'pdf', 'nonfilepath') e.match(r'engine') def test_render_format_unknown(... | null | null | null |
xflr6/graphviz | train | 45 | c87252e4e41eaf1ddbcde9fa2e5fe28fd81302b1 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 80 | 9 | pytest.raises | test_pipe_mocked_fail | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError) as e:
render('', 'pdf', 'nonfilepath')
e.match(r'engine')
def test_render_format_unknown():
with ... | subprocess.CalledProcessError) | modified | c568cb4dccc707cb06768a2fede6ef3a908e9e0ee911b3cabd055525a64c6365 | pytest.raises|test_pipe_mocked_fail|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError) as e: render('', 'pdf', 'nonfilepath') e.match(r'engine') def test_render_format_unknown... | subprocess.CalledProcessError) | 82 | 9 |
xflr6/graphviz | train | 45 | c87252e4e41eaf1ddbcde9fa2e5fe28fd81302b1 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 100 | 4 | assert_* | test_pipe_mocked | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError) as e:
render('', 'pdf', 'nonfilepath')
e.match(r'engine')
def test_render_format_unknown():
with ... | ['dot', '-Tpng']) | modified | 6ecb6f4ddac4f081cc19959eddd1b8b148880bdcfec27bd195f4e05e42c02aa5 | assert_*|test_pipe_mocked|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError) as e: render('', 'pdf', 'nonfilepath') e.match(r'engine') def test_render_format_unknown(): with p... | ['dot', '-Tpng']) | 102 | 4 |
xflr6/graphviz | train | 45 | c87252e4e41eaf1ddbcde9fa2e5fe28fd81302b1 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 120 | 12 | assert_* | test_view | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError) as e:
render('', 'pdf', 'nonfilepath')
e.match(r'engine')
def test_render_format_unknown():
with ... | ['open', 'nonfilepath']) | modified | 8c0648af0fac3ba787f02ea2e76a538218d6e326b1dd5470b4aa42768c704f53 | assert_*|test_view|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError) as e: render('', 'pdf', 'nonfilepath') e.match(r'engine') def test_render_format_unknown(): with pytest.r... | ['open', 'nonfilepath']) | 122 | 12 |
xflr6/graphviz | train | 45 | c87252e4e41eaf1ddbcde9fa2e5fe28fd81302b1 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 60 | 4 | assert | test__repr_svg_ | # test_files.py
import pytest
from graphviz.files import File, Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURC... | mocker.sentinel.decoded | modified | 6267a910412f0637672292f64c6b24e25e208ea9a75b253b8582b12f07423fa4 | assert|test__repr_svg_|# test_files.py import pytest from graphviz.files import File, Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOU... | pipe.return_value.decode.return_value | 63 | 4 |
xflr6/graphviz | train | 45 | c87252e4e41eaf1ddbcde9fa2e5fe28fd81302b1 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 83 | 4 | assert | test_filepath | # test_files.py
import pytest
from graphviz.files import File, Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURC... | ('test-output/hello.gv', 'test-output\\hello.gv') | added | db83acbd209e53500ce21a0d8ef9e68790e4f5ab9e5059e40314849d58935b04 | assert|test_filepath|# test_files.py import pytest from graphviz.files import File, Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURC... | null | null | null |
xflr6/graphviz | train | 45 | c87252e4e41eaf1ddbcde9fa2e5fe28fd81302b1 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 93 | 4 | assert | test_save | # test_files.py
import pytest
from graphviz.files import File, Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURC... | source.filename == filename and source.directory == directory | added | 79f9106b1623bdddb3869927b24de3b61fb07a6eeedc69132bc40e5eae4890bb | assert|test_save|# test_files.py import pytest from graphviz.files import File, Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) d... | null | null | null |
xflr6/graphviz | train | 45 | c87252e4e41eaf1ddbcde9fa2e5fe28fd81302b1 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 126 | 13 | pytest.raises | test__view | # test_files.py
import pytest
from graphviz.files import File, Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURC... | RuntimeError) | added | 708dcb44cad1914466b18cea2a7dcf4c14c707b076ed528fe5cae4f9f85d1713 | pytest.raises|test__view|# test_files.py import pytest from graphviz.files import File, Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**S... | null | null | null |
xflr6/graphviz | train | 46 | 58c210b44819043943d18b5284fd550e4ec58613 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 81 | 9 | pytest.raises | test_pipe_mocked_fail | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError) as e:
render('', 'pdf', 'nonfilepath')
e.match(r'engine')
def test_render_format_unknown():
with ... | subprocess.CalledProcessError) | modified | 4e350ec2df3ba5392b1da5a43ca1808b59247d136af9ba0a8a1d2eff14fa291f | pytest.raises|test_pipe_mocked_fail|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError) as e: render('', 'pdf', 'nonfilepath') e.match(r'engine') def test_render_format_unknown... | subprocess.CalledProcessError) | 80 | 9 |
xflr6/graphviz | train | 46 | 58c210b44819043943d18b5284fd550e4ec58613 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 101 | 4 | assert_* | test_pipe_mocked | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError) as e:
render('', 'pdf', 'nonfilepath')
e.match(r'engine')
def test_render_format_unknown():
with ... | ['dot', '-Tpng']) | modified | d4b223dbd31ad2b86bf5c23077de602ae1d666c7ac19d9030dd1839251cbe67f | assert_*|test_pipe_mocked|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError) as e: render('', 'pdf', 'nonfilepath') e.match(r'engine') def test_render_format_unknown(): with p... | ['dot', '-Tpng']) | 100 | 4 |
xflr6/graphviz | train | 46 | 58c210b44819043943d18b5284fd550e4ec58613 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 110 | 4 | assert | test_pipe | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError) as e:
render('', 'pdf', 'nonfilepath')
e.match(r'engine')
def test_render_format_unknown():
with ... | svg_pattern.match(src) | modified | d19f09dcc7823a639b52ca8aadea266c7990604c27cad0ad5f64c971a35acfb0 | assert|test_pipe|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError) as e: render('', 'pdf', 'nonfilepath') e.match(r'engine') def test_render_format_unknown(): with pytest.rai... | svg_pattern.match(src) | 109 | 4 |
xflr6/graphviz | train | 46 | 58c210b44819043943d18b5284fd550e4ec58613 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 121 | 12 | assert_* | test_view | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError) as e:
render('', 'pdf', 'nonfilepath')
e.match(r'engine')
def test_render_format_unknown():
with ... | ['open', 'nonfilepath']) | modified | 00d2d9bfdec651cd7df8f2a3fa1dd7aacb640c9b631dfbe0909569d219fddda9 | assert_*|test_view|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError) as e: render('', 'pdf', 'nonfilepath') e.match(r'engine') def test_render_format_unknown(): with pytest.r... | ['open', 'nonfilepath']) | 120 | 12 |
xflr6/graphviz | train | 46 | 58c210b44819043943d18b5284fd550e4ec58613 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 76 | 4 | assert | test_pipe | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | pipe.return_value | modified | ca352e5d87e7c40bd9003271fab5f80f3d4c5460cbb58a681bbe9a3990763f11 | assert|test_pipe|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) def tes... | pipe.return_value | 76 | 4 |
xflr6/graphviz | train | 46 | 58c210b44819043943d18b5284fd550e4ec58613 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 108 | 4 | assert | test_render | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | render.return_value | modified | a54bbdae7b9bba90438b93ab2b5d605546d81711af51d79ce1257e56be3f5225 | assert|test_render|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) def t... | render.return_value | 107 | 4 |
xflr6/graphviz | train | 46 | 58c210b44819043943d18b5284fd550e4ec58613 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 120 | 4 | assert | test_view | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | render.return_value | modified | 7b282a555cfddbc61a9eb292ee1d786087e01d49f54025e9f3631a32251ffd06 | assert|test_view|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) def tes... | render.return_value | 119 | 4 |
xflr6/graphviz | train | 46 | 58c210b44819043943d18b5284fd550e4ec58613 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 140 | 4 | assert | test_copy | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | source.copy() | modified | 6c610141eb7a5cbfc72fee435cfaffe11cc09dbf438838b46d3a8f5df9ed68f9 | assert|test_copy|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) def tes... | source.copy() | 139 | 4 |
xflr6/graphviz | train | 47 | d506110f062f5344af197e490eef979c713dfc07 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 30 | 9 | pytest.raises | test_render_missingfile | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError) as e:
render('', 'pdf', 'nonfilepath')
e.match(r'engine')
def test_render_format_unknown():
with ... | subprocess.CalledProcessError) | modified | add3ec62ebd90e36e0488b7f86777105f7c156d42877ae36d4fa3370b9fe48f6 | pytest.raises|test_render_missingfile|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError) as e: render('', 'pdf', 'nonfilepath') e.match(r'engine') def test_render_format_unkno... | subprocess.CalledProcessError) | 30 | 9 |
xflr6/graphviz | train | 47 | d506110f062f5344af197e490eef979c713dfc07 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 57 | 4 | assert | test_render | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError) as e:
render('', 'pdf', 'nonfilepath')
e.match(r'engine')
def test_render_format_unknown():
with ... | str(rendered) | modified | 001a5ad34302a0f8ea317808073f901def9beb76d099474b1e5466835dda36c3 | assert|test_render|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError) as e: render('', 'pdf', 'nonfilepath') e.match(r'engine') def test_render_format_unknown(): with pytest.r... | str(rendered) | 57 | 4 |
xflr6/graphviz | train | 47 | d506110f062f5344af197e490eef979c713dfc07 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 63 | 9 | pytest.raises | test_pipe_missingdot | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError) as e:
render('', 'pdf', 'nonfilepath')
e.match(r'engine')
def test_render_format_unknown():
with ... | ExecutableNotFound) | modified | 8fd6072585c3098b6d645068d1800bde680b0d55a530674e52268c003d1786f1 | pytest.raises|test_pipe_missingdot|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError) as e: render('', 'pdf', 'nonfilepath') e.match(r'engine') def test_render_format_unknown(... | ExecutableNotFound) | 63 | 9 |
xflr6/graphviz | train | 47 | d506110f062f5344af197e490eef979c713dfc07 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 95 | 12 | assert_* | test_pipe_mocked_fail | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError) as e:
render('', 'pdf', 'nonfilepath')
e.match(r'engine')
def test_render_format_unknown():
with ... | errs.decode.return_value) | added | d16a3048e861508e68ab3340be669b59d356cc68e877917643942043bfa36ba8 | assert_*|test_pipe_mocked_fail|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError) as e: render('', 'pdf', 'nonfilepath') e.match(r'engine') def test_render_format_unknown(): w... | null | null | null |
xflr6/graphviz | train | 48 | 2ed0c74a7b527e38dfcbcb1b3d854f77de4e69e0 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 11 | 9 | pytest.raises | test_render_engine_unknown | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises( | ValueError, match=r'engine') | modified | 2a60f4c6d59ed5d91b44863ea3c04bf264df71c6f7147db2cd05b3af46291702 | pytest.raises|test_render_engine_unknown|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises( | ValueError) | 11 | 9 |
xflr6/graphviz | train | 48 | 2ed0c74a7b527e38dfcbcb1b3d854f77de4e69e0 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 16 | 9 | pytest.raises | test_render_format_unknown | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_render_format_unknown():
with pytest.rais... | ValueError, match=r'format') | added | 036b2d06d05a499f3201158fadb1239a05ecd9a7fd0b3818200e3e2b11e1c0d8 | pytest.raises|test_render_format_unknown|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown()... | null | null | null |
xflr6/graphviz | train | 48 | 2ed0c74a7b527e38dfcbcb1b3d854f77de4e69e0 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 21 | 9 | pytest.raises | test_render_missingdot | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_render_format_unknown():
with pytest.rais... | ExecutableNotFound, match=r'execute') | added | 88de1c29a6984096f7b5d8d91520fa44abe21ebcae630893c78fb9799b3790c3 | pytest.raises|test_render_missingdot|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown(): wi... | null | null | null |
xflr6/graphviz | train | 48 | 2ed0c74a7b527e38dfcbcb1b3d854f77de4e69e0 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 52 | 9 | pytest.raises | test_attr_invalid_kw | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)))
def classes(request):
return request.param
def ... | ValueError, match=r'attr') | modified | a819a000bfbe9189747715c60620f3af8531e4540b0fabfba468615b732be3e4 | pytest.raises|test_attr_invalid_kw|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2))) def classes(request): return re... | ValueError) | 53 | 9 |
xflr6/graphviz | train | 48 | 2ed0c74a7b527e38dfcbcb1b3d854f77de4e69e0 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 70 | 9 | pytest.raises | test_subgraph_graph_notsole | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)))
def classes(request):
return request.param
def ... | ValueError, match=r'sole') | modified | 01c63e2072a9735f91cb7db0c95a945a830f2424cd21e682e74c9a873e252e1b | pytest.raises|test_subgraph_graph_notsole|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2))) def classes(request): re... | ValueError) | 72 | 9 |
xflr6/graphviz | train | 48 | 2ed0c74a7b527e38dfcbcb1b3d854f77de4e69e0 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 64 | 4 | assert | test_pipe_format | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | format_ | modified | ae39a4cfa85dc42959d4655baa0ae000a6b9ae59071b6520d328c1c4e67e2bb3 | assert|test_pipe_format|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) ... | format_ | 67 | 4 |
xflr6/graphviz | train | 48 | 2ed0c74a7b527e38dfcbcb1b3d854f77de4e69e0 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 80 | 4 | assert | test_filepath | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | ('test-output/hello.gv', 'test-output\\hello.gv') | modified | 4fdb1e1cb3ac10e36d3e5a3ed3e5874d0b229f56d62782faade397eaccdb4d7c | assert|test_filepath|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) def... | ('test-output/hello.gv', 'test-output\\hello.gv') | 83 | 4 |
xflr6/graphviz | train | 48 | 2ed0c74a7b527e38dfcbcb1b3d854f77de4e69e0 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 96 | 4 | assert | test_save | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | [mocker.call(source.source), mocker.call(u'\n')] | modified | 1aa64bad850a05d93652e56d2e8081baccf44fdf6227a017bf3c5c191ef1f307 | assert|test_save|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) def tes... | [mocker.call(source.source), mocker.call(u'\n')] | 99 | 4 |
xflr6/graphviz | train | 49 | 4ef91a9406ba04c4640ecd4584087b6e254710f7 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 21 | 9 | pytest.raises | test_render_missing_executable | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_render_format_unknown():
with pytest.rais... | ExecutableNotFound, match=r'execute') | added | 0252b76723ba33d3441340dff16ce9e520d9a84fd03be86047da5f2e95853e82 | pytest.raises|test_render_missing_executable|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unkno... | null | null | null |
xflr6/graphviz | train | 49 | 4ef91a9406ba04c4640ecd4584087b6e254710f7 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 61 | 9 | pytest.raises | test_pipe_missing_executable | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_render_format_unknown():
with pytest.rais... | ExecutableNotFound, match=r'execute') | added | 7c503828289cb8bc5466277302d92f4400eb3c0c7989a35ef359be046bde395d | pytest.raises|test_pipe_missing_executable|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown... | null | null | null |
xflr6/graphviz | train | 49 | 4ef91a9406ba04c4640ecd4584087b6e254710f7 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 67 | 9 | pytest.raises | test_pipe_invalid_data | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_render_format_unknown():
with pytest.rais... | subprocess.CalledProcessError) | added | 4b71cc4372cc553b9c460c4dbd6e15d436cbd3685e481c0987db5b69e93ff869 | pytest.raises|test_pipe_invalid_data|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown(): wi... | null | null | null |
xflr6/graphviz | train | 49 | 4ef91a9406ba04c4640ecd4584087b6e254710f7 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 107 | 12 | assert_* | test_pipe_pipe_invalid_data_mocked | # test_backend.py
import subprocess
import pytest
from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_render_format_unknown():
with pytest.rais... | stderr.encoding) | added | 6c5979c517cc16ebf00b256995c3cf2060be22e9eef8cdd3013d99311465bb9c | assert_*|test_pipe_pipe_invalid_data_mocked|# test_backend.py import subprocess import pytest from graphviz.backend import render, pipe, view, ExecutableNotFound, STARTUPINFO def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknow... | null | null | null |
xflr6/graphviz | train | 50 | 1a666e7af6667563634b759846c39cb46e013417 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 28 | 4 | assert | test_copy | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)),
ids=lambda c: '%s, %s' % (c[0].__name_... | c.__dict__ | modified | 8873b4a3b7e69a48d0cbd76ff177ad22d9e92d141a6642fbe9e7332070373189 | assert|test_copy|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)), ids=lambda c: '%s, %s' % (c[0].__name__, c[1].__n... | c.__dict__ | 27 | 4 |
xflr6/graphviz | train | 50 | 1a666e7af6667563634b759846c39cb46e013417 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 53 | 9 | pytest.raises | test_attr_invalid_kw | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)),
ids=lambda c: '%s, %s' % (c[0].__name_... | ValueError, match=r'attr') | modified | d7cdea5e8841936d6cdc125d17459648ab25d943c598de006984187b818938a3 | pytest.raises|test_attr_invalid_kw|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)), ids=lambda c: '%s, %s' % (c[0].... | ValueError, match=r'attr') | 52 | 9 |
xflr6/graphviz | train | 50 | 1a666e7af6667563634b759846c39cb46e013417 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 67 | 4 | assert | test_subgraph_graph_none | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)),
ids=lambda c: '%s, %s' % (c[0].__name_... | 'graph {\n\t// comment\n\tsubgraph name {\n\t}\n}' | modified | a3de82d8c5357a9836b706a1f579ccfe80a47ae0cc4b385e6c8ff0d8c75957d4 | assert|test_subgraph_graph_none|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)), ids=lambda c: '%s, %s' % (c[0].__n... | 'graph {\n\t// comment\n\tsubgraph name {\n\t}\n}' | 66 | 4 |
xflr6/graphviz | train | 50 | 1a666e7af6667563634b759846c39cb46e013417 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 169 | 4 | assert | test_label_html | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)),
ids=lambda c: '%s, %s' % (c[0].__name_... | '''digraph structs { node [shape=plaintext] struct1 [label=< <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> <TR> <TD>left</TD> <TD PORT="f1">middle</TD> <TD PORT="f2">right</TD> </TR> </TABLE>>] struct2 [label=< <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> <TR> <TD PORT="f0">one</TD> <TD>two</TD> </TR> </TABLE>... | modified | 2a7eb4e2edf580f65124645f02677805d89da467106813d027d901cc5e48bdf6 | assert|test_label_html|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)), ids=lambda c: '%s, %s' % (c[0].__name__, c[... | '''digraph structs { node [shape=plaintext] struct1 [label=< <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> <TR> <TD>left</TD> <TD PORT="f1">middle</TD> <TD PORT="f2">right</TD> </TR> </TABLE>>] struct2 [label=< <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> <TR> <TD PORT="f0">one</TD> <TD>two</TD> </TR> </TABLE>... | 168 | 4 |
xflr6/graphviz | train | 51 | 7ac04186adc0c37b7ae6c136b651744810e3f21a | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 104 | 4 | assert | test_render | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | render.return_value | modified | cfe4453cf47a882ab5653bef116fca345124cb4984170c2cfe014cf191ecb779 | assert|test_render|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) def t... | render.return_value | 105 | 4 |
xflr6/graphviz | train | 51 | 7ac04186adc0c37b7ae6c136b651744810e3f21a | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 116 | 4 | assert | test_view | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | render.return_value | modified | b0c173e845a075b499355f1dad34df436a447e7cfda4ab3e39f8673cfea6000d | assert|test_view|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) def tes... | render.return_value | 117 | 4 |
xflr6/graphviz | train | 51 | 7ac04186adc0c37b7ae6c136b651744810e3f21a | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 128 | 8 | assert | test__view | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | None | modified | a9a30982e0d4d6c423bfa4a60c1fc3ae5e1bc6905455622408c7867f2fae4b0a | assert|test__view|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) def te... | None | 129 | 8 |
xflr6/graphviz | train | 51 | 7ac04186adc0c37b7ae6c136b651744810e3f21a | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 135 | 4 | assert | test_copy | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | source.copy() | modified | e31127f74f0fc626114efe6b9157b38c79f27c3ee80f287da37303a14278af08 | assert|test_copy|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) def tes... | source.copy() | 136 | 4 |
xflr6/graphviz | train | 52 | 11afe2a8ee4d123cb9d4dc1f6d36f4003241ce49 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 22 | 9 | pytest.raises | test_render_missing_executable | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | ExecutableNotFound, match=r'execute') | modified | bb8ef841d2fed9ab081cabbc90fb2013c92b549b47d50d20a041073b1dd8aa9e | pytest.raises|test_render_missing_executable|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_f... | ExecutableNotFound, match=r'execute') | 21 | 9 |
xflr6/graphviz | train | 52 | 11afe2a8ee4d123cb9d4dc1f6d36f4003241ce49 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 68 | 9 | pytest.raises | test_pipe_invalid_data | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | subprocess.CalledProcessError) | modified | d3a8154549eae95bb694c60f89b8f8025543fdb6709f055e1e3b31d2a10ca90f | pytest.raises|test_pipe_invalid_data|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_un... | subprocess.CalledProcessError) | 67 | 9 |
xflr6/graphviz | train | 52 | 11afe2a8ee4d123cb9d4dc1f6d36f4003241ce49 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 100 | 4 | assert_* | test_pipe_pipe_invalid_data_mocked | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | ['dot', '-Tpng']) | modified | 15f8689dc5d93447c879735f5ef450277a3374186037eeceacdeb58f7813b173 | assert_*|test_pipe_pipe_invalid_data_mocked|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_fo... | ['dot', '-Tpng']) | 99 | 4 |
xflr6/graphviz | train | 52 | 11afe2a8ee4d123cb9d4dc1f6d36f4003241ce49 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 127 | 9 | pytest.raises | test_version_missing_executable | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | ExecutableNotFound, match=r'execute') | added | c0fd6d75121377898d36e4b47cab038490bf6cd3bc47a326562754cbc0418fb1 | pytest.raises|test_version_missing_executable|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_... | null | null | null |
xflr6/graphviz | train | 53 | dab85eddf9ea7f0902bd4f649e0dced99c413a19 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 124 | 4 | assert_* | test_pipe_mocked | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | b'nongraph') | modified | 1b5d273d0e6105c907e7a803d7df1fbc365813bf1e4db8953e1bb38b09ba7f8e | assert_*|test_pipe_mocked|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown(): wi... | b'nongraph') | 123 | 4 |
xflr6/graphviz | train | 53 | dab85eddf9ea7f0902bd4f649e0dced99c413a19 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 128 | 9 | pytest.raises | test_version_missing_executable | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | ExecutableNotFound, match=r'execute') | modified | 314198b0398d8d386e069a15caa5c152a1b0b2859ab8a9ab5e921fc23878d04f | pytest.raises|test_version_missing_executable|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_... | ExecutableNotFound, match=r'execute') | 127 | 9 |
xflr6/graphviz | train | 53 | dab85eddf9ea7f0902bd4f649e0dced99c413a19 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 135 | 4 | assert | test_version | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | ('', '') | modified | ee5718987b73eb031babb8effc562d919ccb7c6824f19c9aefe7caebe2956e4e | assert|test_version|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown(): with pyt... | ('', '') | 134 | 4 |
xflr6/graphviz | train | 53 | dab85eddf9ea7f0902bd4f649e0dced99c413a19 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 156 | 12 | assert_* | test_view | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | 'nonfilepath') | modified | a4d1473d9d4fb22dff4ddbddfec2bef0105cdd02b260c555b082d0b580aeb8ce | assert_*|test_view|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown(): with pyte... | 'nonfilepath') | 155 | 12 |
xflr6/graphviz | train | 54 | af6c863b91898cac62f66eba656e267c2684fa0e | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 140 | 9 | pytest.raises | test_version_parsefail_mocked | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | RuntimeError) | added | 5fae09fcce1c74bc535652cf0c75cedfe3374590a5cc7251cbb59a67cf36278e | pytest.raises|test_version_parsefail_mocked|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_fo... | null | null | null |
xflr6/graphviz | train | 54 | af6c863b91898cac62f66eba656e267c2684fa0e | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 142 | 4 | assert_* | test_version_parsefail_mocked | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | ['dot', '-V']) | added | dc3f40127510ef650f064ac3ed5c2bca7e1d259d0502f87cfbf699fd60947e76 | assert_*|test_version_parsefail_mocked|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_... | null | null | null |
xflr6/graphviz | train | 54 | af6c863b91898cac62f66eba656e267c2684fa0e | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 149 | 4 | assert_* | test_version_mocked | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | ['dot', '-V']) | added | 761844a5d2935e216ce8eacd16697a354e86e032a902390e2adfe7419c2cb26e | assert_*|test_version_mocked|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown():... | null | null | null |
xflr6/graphviz | train | 54 | af6c863b91898cac62f66eba656e267c2684fa0e | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 155 | 13 | pytest.raises | test_view | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | RuntimeError, match=r'platform') | added | 76ff1e86a727b9bc238db3f82eee1088057b1a91db1435303f9c5c7edd84adf4 | pytest.raises|test_view|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown(): with... | null | null | null |
xflr6/graphviz | train | 55 | 2363e088df1302316fd7bf859a59d50e3b6cee7c | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 53 | 4 | assert | test_clear | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)),
ids=lambda c: '%s, %s' % (c[0].__name_... | body | added | 5ea0c564bb04c111f48dd4d1ace999658935ae07cd132f84ff52005066c0a928 | assert|test_clear|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)), ids=lambda c: '%s, %s' % (c[0].__name__, c[1].__... | null | null | null |
xflr6/graphviz | train | 55 | 2363e088df1302316fd7bf859a59d50e3b6cee7c | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 61 | 9 | pytest.raises | test_iter_subgraph_strict | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)),
ids=lambda c: '%s, %s' % (c[0].__name_... | ValueError, match=r'strict') | added | 434f51b2cadcc1b3974573469f24cf88bacce080f620815f5262aa110d84dae6 | pytest.raises|test_iter_subgraph_strict|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)), ids=lambda c: '%s, %s' % (... | null | null | null |
xflr6/graphviz | train | 55 | 2363e088df1302316fd7bf859a59d50e3b6cee7c | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 89 | 9 | pytest.raises | test_subgraph_graph_notsole | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)),
ids=lambda c: '%s, %s' % (c[0].__name_... | ValueError, match=r'sole') | added | cf0e972c3191da12f1bf71d408abd5cc5091383c5a0d6573d7e2644c2f86883e | pytest.raises|test_subgraph_graph_notsole|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)), ids=lambda c: '%s, %s' %... | null | null | null |
xflr6/graphviz | train | 55 | 2363e088df1302316fd7bf859a59d50e3b6cee7c | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 95 | 9 | pytest.raises | test_subgraph_mixed | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)),
ids=lambda c: '%s, %s' % (c[0].__name_... | ValueError, match=r'kind') | added | 77ae5fba2c7e79b4fddf566b2f529ffb95d2952e01b630412c4821d79389c158 | pytest.raises|test_subgraph_mixed|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)), ids=lambda c: '%s, %s' % (c[0]._... | null | null | null |
xflr6/graphviz | train | 56 | 32dcff09c44716775f9295ef1509799644571db3 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 57 | 8 | assert | test_clear | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)),
ids=lambda c: '%s, %s' % (c[0].__name_... | all(getattr(c, k) == {} for k in kwargs) | modified | 57497831ae8b6ce366eb53be648aa7d93cb246a54aa88fc656fa25bce168b505 | assert|test_clear|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)), ids=lambda c: '%s, %s' % (c[0].__name__, c[1].__... | all(getattr(c, k) == {} for k, v in kwargs.items()) | 57 | 8 |
xflr6/graphviz | train | 56 | 32dcff09c44716775f9295ef1509799644571db3 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 61 | 9 | pytest.raises | test_iter_subgraph_strict | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)),
ids=lambda c: '%s, %s' % (c[0].__name_... | ValueError, match=r'strict') | modified | db8ae920253ee248f2e604e40f38d39fd5a00ddb1d336b49ccea41c227cb4102 | pytest.raises|test_iter_subgraph_strict|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)), ids=lambda c: '%s, %s' % (... | ValueError, match=r'strict') | 61 | 9 |
xflr6/graphviz | train | 56 | 32dcff09c44716775f9295ef1509799644571db3 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 66 | 4 | assert | test_iter_strict | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)),
ids=lambda c: '%s, %s' % (c[0].__name_... | 'strict graph {\n}' | modified | 5b3ecb5ef8e8c22862520e4ad3b188fca399554579ede08a577b54dc98c6b85e | assert|test_iter_strict|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)), ids=lambda c: '%s, %s' % (c[0].__name__, c... | 'strict graph {\n}' | 66 | 4 |
xflr6/graphviz | train | 56 | 32dcff09c44716775f9295ef1509799644571db3 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 78 | 4 | assert | test_attr_kw_none | # test_dot.py
# flake8: noqa
import itertools
import pytest
from graphviz.dot import Graph, Digraph
@pytest.fixture(params=[Graph, Digraph])
def cls(request):
return request.param
@pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)),
ids=lambda c: '%s, %s' % (c[0].__name_... | 'graph {\n\tspam=eggs\n}' | modified | a265f09529efffd4c0b441c1310784788d0a465a5387bb97320b34c8335fd2dd | assert|test_attr_kw_none|# test_dot.py # flake8: noqa import itertools import pytest from graphviz.dot import Graph, Digraph @pytest.fixture(params=[Graph, Digraph]) def cls(request): return request.param @pytest.fixture(params=list(itertools.permutations([Graph, Digraph], 2)), ids=lambda c: '%s, %s' % (c[0].__name__, ... | 'graph {\n\tspam=eggs\n}' | 78 | 4 |
xflr6/graphviz | train | 57 | 4e2b702a89c955b8f787dcb0db243cd3a6568a16 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 69 | 9 | pytest.raises | test_pipe_invalid_data | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | subprocess.CalledProcessError) | modified | 0b73a6834c5758285ee5e55c30ded7a4a96eee33bf2df610ddba2e896d49a3b7 | pytest.raises|test_pipe_invalid_data|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_un... | subprocess.CalledProcessError) | 69 | 9 |
xflr6/graphviz | train | 57 | 4e2b702a89c955b8f787dcb0db243cd3a6568a16 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 119 | 4 | assert | test_pipe_mocked | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | mocker.sentinel.outs | modified | ebaf70c25a656a34b76a38a691f88a88f820a77615629a2ad7325b17b5410a13 | assert|test_pipe_mocked|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown(): with... | mocker.sentinel.outs | 119 | 4 |
xflr6/graphviz | train | 57 | 4e2b702a89c955b8f787dcb0db243cd3a6568a16 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 128 | 9 | pytest.raises | test_version_missing_executable | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | ExecutableNotFound, match=r'execute') | modified | 249e7134213947db38ed85bfde282d3cbc8f5865e5e29090333bbc8f91e5a40a | pytest.raises|test_version_missing_executable|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_... | ExecutableNotFound, match=r'execute') | 128 | 9 |
xflr6/graphviz | train | 57 | 4e2b702a89c955b8f787dcb0db243cd3a6568a16 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 148 | 4 | assert | test_version_mocked | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | (1, 2, 3) | modified | d1414ab12b19e0bdeafd83ce6b731c51d8df0e6a85d02134377df5014333d9a6 | assert|test_version_mocked|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown(): w... | (1, 2, 3) | 148 | 4 |
xflr6/graphviz | train | 58 | 670c64c588413aab7ce1002a9a88dd992823f499 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 42 | 4 | assert | test_render | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | rendered.size() | modified | bcb9a4c6b5325ac9f76aead835e66993f65d139f7a73903ea435faa035caef30 | assert|test_render|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown(): with pyte... | rendered.size() | 42 | 4 |
xflr6/graphviz | train | 58 | 670c64c588413aab7ce1002a9a88dd992823f499 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 121 | 4 | assert_* | test_pipe_mocked | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | ['dot', '-Tpng']) | modified | b53eab9f6af15d7c2a7db6daf7dec42a2b4aad3d26bbb8114e1e6fee606b661e | assert_*|test_pipe_mocked|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown(): wi... | ['dot', '-Tpng']) | 121 | 4 |
xflr6/graphviz | train | 58 | 670c64c588413aab7ce1002a9a88dd992823f499 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 140 | 9 | pytest.raises | test_version_parsefail_mocked | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | RuntimeError) | modified | ef24dacb80ece68d73325932ed0f7d390d2dacb6262a70120008dc38a37decc4 | pytest.raises|test_version_parsefail_mocked|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_fo... | RuntimeError) | 140 | 9 |
xflr6/graphviz | train | 58 | 670c64c588413aab7ce1002a9a88dd992823f499 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 148 | 4 | assert | test_version_mocked | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | (1, 2, 3) | modified | 7b4582e54850c222d451ccf7a56c106c55ee0d841bfa28c8b82f411e5cc63356 | assert|test_version_mocked|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown(): w... | (1, 2, 3) | 148 | 4 |
xflr6/graphviz | train | 58 | 670c64c588413aab7ce1002a9a88dd992823f499 | train | tests/test_tools.py | train | xflr6/graphviz:tests/test_tools.py | 23 | 13 | pytest.raises | test_mkdirs_invalid | # test_tools.py
import os
import functools
import pytest
from graphviz.tools import mkdirs
def itertree(root):
for path, dirs, files in os.walk(root):
base = os.path.relpath(path, root)
rel_path = functools.partial(os.path.join, base if base != '.' else '')
for is_file, names in [(False... | OSError) | modified | 73e8fe2f5b156b87a72a2f9f1b52f8f0c9c4ab311c8ebb50b544b4e896efafaa | pytest.raises|test_mkdirs_invalid|# test_tools.py import os import functools import pytest from graphviz.tools import mkdirs def itertree(root): for path, dirs, files in os.walk(root): base = os.path.relpath(path, root) rel_path = functools.partial(os.path.join, base if base != '.' else '') for is_file, names in [(Fals... | OSError) | 23 | 13 |
xflr6/graphviz | train | 58 | 670c64c588413aab7ce1002a9a88dd992823f499 | train | tests/test_tools.py | train | xflr6/graphviz:tests/test_tools.py | 33 | 12 | assert | test_mkdirs | # test_tools.py
import os
import functools
import pytest
from graphviz.tools import mkdirs
def itertree(root):
for path, dirs, files in os.walk(root):
base = os.path.relpath(path, root)
rel_path = functools.partial(os.path.join, base if base != '.' else '')
for is_file, names in [(False... | [(False, 'spam'), (False, 'spam/eggs')] | modified | 4ba4c0940aff44e07bf3b2551db928a80d1d1eafae0345ef2c45c7573077e0c1 | assert|test_mkdirs|# test_tools.py import os import functools import pytest from graphviz.tools import mkdirs def itertree(root): for path, dirs, files in os.walk(root): base = os.path.relpath(path, root) rel_path = functools.partial(os.path.join, base if base != '.' else '') for is_file, names in [(False, dirs), (True... | [(False, 'spam'), (False, 'spam/eggs')] | 33 | 12 |
xflr6/graphviz | train | 59 | a77828966597ce8635ce9ac1b54db8a1997f4987 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 81 | 8 | assert | test_filepath | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | 'test-output\\hello.gv' | modified | 166e46a87aa146c1108ce08849cf4c49e60c236aaa599e8c11d4978f240a7cca | assert|test_filepath|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) def... | ('test-output/hello.gv', 'test-output\\hello.gv') | 80 | 4 |
xflr6/graphviz | train | 59 | a77828966597ce8635ce9ac1b54db8a1997f4987 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 111 | 4 | assert_* | test_render | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | save.return_value) | modified | 906c28743e8d2e8fcfe7ac4d174b4f6ce993c34881cdea6befa36b19b38cf412 | assert_*|test_render|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) def... | save.return_value) | 108 | 4 |
xflr6/graphviz | train | 59 | a77828966597ce8635ce9ac1b54db8a1997f4987 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 131 | 8 | assert | test__view | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | None | modified | 2d91b394c068f87635d28b4f88886bf65d354d0158f86b7b2bfdbfa50fb54d01 | assert|test__view|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) def te... | None | 128 | 8 |
xflr6/graphviz | train | 59 | a77828966597ce8635ce9ac1b54db8a1997f4987 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 140 | 4 | assert | test_copy | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | source.__dict__ | modified | b7b2ff986c7930914e8e967e3a7666080faaade2e140c3bd98e9fd5b4eb9d327 | assert|test_copy|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) def tes... | source.__dict__ | 137 | 4 |
xflr6/graphviz | train | 60 | 653aec0f4c0a01f5abd7cb5859fe8c475fdb6cdb | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 150 | 4 | assert | test_from_file | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | data | added | 195edf71f2bc4be2185c92ae46ddff039d6c13d0c811cbdb61c2ea078c8fe1dd | assert|test_from_file|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) de... | null | null | null |
xflr6/graphviz | train | 60 | 653aec0f4c0a01f5abd7cb5859fe8c475fdb6cdb | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 151 | 4 | assert | test_from_file | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | filename | added | 8aba20748487d4eadbd09f60a70ca34656e6313d12d24bb860ae2c5eed33de86 | assert|test_from_file|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) de... | null | null | null |
xflr6/graphviz | train | 60 | 653aec0f4c0a01f5abd7cb5859fe8c475fdb6cdb | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 152 | 4 | assert | test_from_file | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | str(lpath) | added | 109a1fa7ca5f6e573a92367dae0e9891f734128354d0e876f485e33200d22008 | assert|test_from_file|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) de... | null | null | null |
xflr6/graphviz | train | 60 | 653aec0f4c0a01f5abd7cb5859fe8c475fdb6cdb | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 153 | 4 | assert | test_from_file | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | encoding | added | e77dcd07f9d056ed57fe0d6c9be70a84a8bc96fa05bfc4b795128ec52155b2c6 | assert|test_from_file|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) de... | null | null | null |
xflr6/graphviz | train | 61 | 484e3b0e6a9438e3f670ded6da80f29960f1c510 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 150 | 4 | assert | test_from_file | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | 'utf-8' | modified | ed8f020e51614405af3dcef6c42cb62fdb87d8a2c1f1fefb0a18aa3f9ece4479 | assert|test_from_file|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) de... | data | 150 | 4 |
xflr6/graphviz | train | 61 | 484e3b0e6a9438e3f670ded6da80f29960f1c510 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 154 | 4 | assert | test_from_file | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | data | modified | a0130ec6fe719b468e3bf922c812bfc38f0f64792f98b2ce2b9dc08fdeb48447 | assert|test_from_file|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) de... | filename | 151 | 4 |
xflr6/graphviz | train | 61 | 484e3b0e6a9438e3f670ded6da80f29960f1c510 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 155 | 4 | assert | test_from_file | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | filename | modified | f0f5396a61d453594cee86d97162082689c1f48735b751a835fa5eaedbdfd587 | assert|test_from_file|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) de... | str(lpath) | 152 | 4 |
xflr6/graphviz | train | 61 | 484e3b0e6a9438e3f670ded6da80f29960f1c510 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 156 | 4 | assert | test_from_file | # test_files.py
import pytest
from graphviz.files import Source
SOURCE = {
'source': 'digraph { hello -> world }',
'filename': 'hello.gv', 'directory': 'test-output',
'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8',
}
@pytest.fixture(scope='module')
def source():
return Source(**SOURCE)
d... | str(lpath) | modified | 3b0410b9757549ccf999a47d3b94e7312fa2565aaaa5e0f97198f93e100e91d4 | assert|test_from_file|# test_files.py import pytest from graphviz.files import Source SOURCE = { 'source': 'digraph { hello -> world }', 'filename': 'hello.gv', 'directory': 'test-output', 'format': 'PNG', 'engine': 'NEATO', 'encoding': 'utf-8', } @pytest.fixture(scope='module') def source(): return Source(**SOURCE) de... | encoding | 153 | 4 |
xflr6/graphviz | train | 62 | a71e612fa8a7baf111c9fac14afd723aafd0ccf4 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 51 | 4 | assert | test_render_mocked | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | 'nonfilepath.pdf' | modified | 912c9f2387753e0aecf7041dea65a66059846449a7c79277d09425e964a4b31d | assert|test_render_mocked|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown(): wi... | 'nonfilepath.pdf' | 50 | 4 |
xflr6/graphviz | train | 62 | a71e612fa8a7baf111c9fac14afd723aafd0ccf4 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 106 | 4 | assert_* | test_pipe_pipe_invalid_data_mocked | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | b'nongraph') | modified | c4102e760fb58236d8733ba20ea4f377f309ea321558b1b844a40b4f980777ea | assert_*|test_pipe_pipe_invalid_data_mocked|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_fo... | b'nongraph') | 104 | 4 |
xflr6/graphviz | train | 62 | a71e612fa8a7baf111c9fac14afd723aafd0ccf4 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 137 | 4 | assert | test_version | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | None | modified | befebb1e4d78cd02064ab33778bcec8978cacdbb75639c80af83df7b02a4fd96 | assert|test_version|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown(): with pyt... | None | 134 | 4 |
xflr6/graphviz | train | 62 | a71e612fa8a7baf111c9fac14afd723aafd0ccf4 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 163 | 12 | assert_* | test_view | # test_backend.py
import subprocess
import pytest
from graphviz.backend import (render, pipe, version, view,
ExecutableNotFound, STARTUPINFO)
def test_render_engine_unknown():
with pytest.raises(ValueError, match=r'engine'):
render('', 'pdf', 'nonfilepath')
def test_rend... | ['open', 'nonfilepath']) | modified | 9b0f037e74032aa3b2c5fb4b43466ee9f7863f7778370c431b2f3750dd2f1016 | assert_*|test_view|# test_backend.py import subprocess import pytest from graphviz.backend import (render, pipe, version, view, ExecutableNotFound, STARTUPINFO) def test_render_engine_unknown(): with pytest.raises(ValueError, match=r'engine'): render('', 'pdf', 'nonfilepath') def test_render_format_unknown(): with pyte... | ['open', 'nonfilepath']) | 160 | 12 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.