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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
xaviml/controllerx | train | 73 | 3f13f042b6a877af6fad950fc6a4001461fc86cf | train | tests/unit_tests/cx_core/stepper/index_loop_stepper_test.py | train | xaviml/controllerx:tests/unit_tests/cx_core/stepper/index_loop_stepper_test.py | 28 | 4 | assert | test_index_loop_stepper | import pytest
from cx_core.stepper import Stepper
from cx_core.stepper.index_loop_stepper import IndexLoopStepper
from typing_extensions import Literal
@pytest.mark.parametrize(
"size, value, direction, expected_value",
[
(10, 5, Stepper.DOWN, 4),
(10, 5, Stepper.UP, 6),
(10, 1, Steppe... | not stepper_output.exceeded | added | 5fdf182fc3240527a07c5bbbaa776b347e7701e2840290d3d7edf5e4bc7350f7 | assert|test_index_loop_stepper|import pytest from cx_core.stepper import Stepper from cx_core.stepper.index_loop_stepper import IndexLoopStepper from typing_extensions import Literal @pytest.mark.parametrize( "size, value, direction, expected_value", [ (10, 5, Stepper.DOWN, 4), (10, 5, Stepper.UP, 6), (10, 1, Stepper.D... | null | null | null |
xaviml/controllerx | train | 73 | 3f13f042b6a877af6fad950fc6a4001461fc86cf | train | tests/unit_tests/cx_core/stepper/loop_stepper_test.py | train | xaviml/controllerx:tests/unit_tests/cx_core/stepper/loop_stepper_test.py | 36 | 4 | assert | test_loop_stepper | import pytest
from cx_core.stepper import MinMax, Stepper
from cx_core.stepper.loop_stepper import LoopStepper
from typing_extensions import Literal
@pytest.mark.parametrize(
"min_max, value, steps, direction, expected_value",
[
(MinMax(0, 10), 5, 10, Stepper.DOWN, 4),
(MinMax(0, 10), 5, 10, S... | not stepper_output.exceeded | added | 98512ce5f4d03d29a5c53f742406b4e2ee7d3c23ad0d1e519e50fa701b2ad1f9 | assert|test_loop_stepper|import pytest from cx_core.stepper import MinMax, Stepper from cx_core.stepper.loop_stepper import LoopStepper from typing_extensions import Literal @pytest.mark.parametrize( "min_max, value, steps, direction, expected_value", [ (MinMax(0, 10), 5, 10, Stepper.DOWN, 4), (MinMax(0, 10), 5, 10, St... | null | null | null |
xaviml/controllerx | train | 73 | 3f13f042b6a877af6fad950fc6a4001461fc86cf | train | tests/unit_tests/cx_core/stepper/stepper_test.py | train | xaviml/controllerx:tests/unit_tests/cx_core/stepper/stepper_test.py | 48 | 4 | assert | test_sign | import pytest
from cx_const import Number
from cx_core.stepper import MinMax, Stepper, StepperOutput
class FakeStepper(Stepper):
def __init__(self) -> None:
super().__init__(MinMax(0, 1), 1)
def step(self, value: Number, direction: str) -> StepperOutput:
return StepperOutput(next_value=0, nex... | expected_sign | added | cbfc9cac1a883fbbbd3679bd79c5a210c58494273b3130946998f8463b8a7896 | assert|test_sign|import pytest from cx_const import Number from cx_core.stepper import MinMax, Stepper, StepperOutput class FakeStepper(Stepper): def __init__(self) -> None: super().__init__(MinMax(0, 1), 1) def step(self, value: Number, direction: str) -> StepperOutput: return StepperOutput(next_value=0, next_directio... | null | null | null |
xaviml/controllerx | train | 73 | 3f13f042b6a877af6fad950fc6a4001461fc86cf | train | tests/unit_tests/cx_core/stepper/stop_stepper_test.py | train | xaviml/controllerx:tests/unit_tests/cx_core/stepper/stop_stepper_test.py | 121 | 4 | assert | test_stop_stepper_get_direction | import pytest
from cx_core.stepper import MinMax, Stepper
from cx_core.stepper.stop_stepper import StopStepper
from typing_extensions import Literal
@pytest.mark.parametrize(
"min_max, value, direction, previous_direction, expected_direction, expected_new_previous_direction",
[
(MinMax(0, 10), 10, Ste... | expected_new_previous_direction | added | 53fc665565ab21a6131025a2385f4557567e9da0881f6efb68ca782923efc639 | assert|test_stop_stepper_get_direction|import pytest from cx_core.stepper import MinMax, Stepper from cx_core.stepper.stop_stepper import StopStepper from typing_extensions import Literal @pytest.mark.parametrize( "min_max, value, direction, previous_direction, expected_direction, expected_new_previous_direction", [ (M... | null | null | null |
xaviml/controllerx | train | 73 | 3f13f042b6a877af6fad950fc6a4001461fc86cf | train | tests/unit_tests/cx_core/stepper/stop_stepper_test.py | train | xaviml/controllerx:tests/unit_tests/cx_core/stepper/stop_stepper_test.py | 152 | 4 | assert | test_stop_stepper_step | import pytest
from cx_core.stepper import MinMax, Stepper
from cx_core.stepper.stop_stepper import StopStepper
from typing_extensions import Literal
@pytest.mark.parametrize(
"min_max, value, direction, previous_direction, expected_direction, expected_new_previous_direction",
[
(MinMax(0, 10), 10, Ste... | expected_exceeded | added | b618b0bfb3818b09b7461a2796a8b4484d9d11dd9c11072ebe42aae75e2b7c6e | assert|test_stop_stepper_step|import pytest from cx_core.stepper import MinMax, Stepper from cx_core.stepper.stop_stepper import StopStepper from typing_extensions import Literal @pytest.mark.parametrize( "min_max, value, direction, previous_direction, expected_direction, expected_new_previous_direction", [ (MinMax(0, ... | null | null | null |
xaviml/controllerx | train | 73 | 3f13f042b6a877af6fad950fc6a4001461fc86cf | train | tests/unit_tests/cx_core/type/light_controller_test.py | train | xaviml/controllerx:tests/unit_tests/cx_core/type/light_controller_test.py | 635 | 8 | assert_* | test_hold | from typing import Any, Dict, Set, Union
import pytest
from _pytest.monkeypatch import MonkeyPatch
from cx_core import LightController, ReleaseHoldController
from cx_core.controller import Controller
from cx_core.feature_support.light import LightSupport
from cx_core.stepper import MinMax, Stepper
from cx_core.stepper... | stepper) | modified | 39d923a6100e0b1c8d1dc8df0fd88d3f05f6d76dff7ad2e219cdecd42c375a52 | assert_*|test_hold|from typing import Any, Dict, Set, Union import pytest from _pytest.monkeypatch import MonkeyPatch from cx_core import LightController, ReleaseHoldController from cx_core.controller import Controller from cx_core.feature_support.light import LightSupport from cx_core.stepper import MinMax, Stepper fr... | expected_direction) | 634 | 8 |
xflr6/graphviz | train | 0 | 6af944fe6524e4b357e62f77066354649243a3b4 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 14 | 13 | self.assertRaises | test_format | # test_files.py
import unittest
from graphviz.files import File
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaises( | ValueError) | added | 609a4337b82e3533b3f64aa506c107a91d7ec857c42e5175cac78bbcbe0b203a | self.assertRaises|test_format|# test_files.py import unittest from graphviz.files import File class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaises( | null | null | null |
xflr6/graphviz | train | 0 | 6af944fe6524e4b357e62f77066354649243a3b4 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 18 | 13 | self.assertRaises | test_engine | # test_files.py
import unittest
from graphviz.files import File
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaises(ValueError):
self.file.format = 'spam'
def test_engine(self):
with self.assertRaises... | ValueError) | added | 53e67b5f9c11c895a8a39589c55371a9f8acf32c529ac09e784b3e57e389d8ca | self.assertRaises|test_engine|# test_files.py import unittest from graphviz.files import File class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaises(ValueError): self.file.format = 'spam' def test_engine(self): with self.assertRaises( | null | null | null |
xflr6/graphviz | train | 0 | 6af944fe6524e4b357e62f77066354649243a3b4 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 22 | 13 | self.assertRaises | test_encoding | # test_files.py
import unittest
from graphviz.files import File
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaises(ValueError):
self.file.format = 'spam'
def test_engine(self):
with self.assertRaises... | LookupError) | added | 3d5e8af4556ba04b89c55ad901d761621db89fecd9c96c9266786d8bbd199648 | self.assertRaises|test_encoding|# test_files.py import unittest from graphviz.files import File class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaises(ValueError): self.file.format = 'spam' def test_engine(self): with self.assertRaises(ValueError): self.file... | null | null | null |
xflr6/graphviz | train | 0 | 6af944fe6524e4b357e62f77066354649243a3b4 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 32 | 8 | self.assertEqual | test_init | # test_files.py
import unittest
from graphviz.files import File
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaises(ValueError):
self.file.format = 'spam'
def test_engine(self):
with self.assertRaises... | 'neato') | added | 281c1f0005a80c48a2b1823b2c94477c3f923bf72b7b9c72ee7f7d6bffee645f | self.assertEqual|test_init|# test_files.py import unittest from graphviz.files import File class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaises(ValueError): self.file.format = 'spam' def test_engine(self): with self.assertRaises(ValueError): self.file.engi... | null | null | null |
xflr6/graphviz | train | 1 | f1dc5b468f09572cea96c171b3fd7f2612c84118 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 30 | 8 | self.assertEqual | test_init | # test_files.py
import unittest
from graphviz.files import File
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaises(ValueError):
self.file.format = 'spam'
def test_engine(self):
with self.assertRaises... | 'name') | modified | 9a467338c4bbed776f7b1e4069f7bd79dc332ef92525d1078bb266017d5482e6 | self.assertEqual|test_init|# test_files.py import unittest from graphviz.files import File class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaises(ValueError): self.file.format = 'spam' def test_engine(self): with self.assertRaises(ValueError): self.file.engi... | 'name') | 30 | 8 |
xflr6/graphviz | train | 1 | f1dc5b468f09572cea96c171b3fd7f2612c84118 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 32 | 8 | self.assertEqual | test_init | # test_files.py
import unittest
from graphviz.files import File
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaises(ValueError):
self.file.format = 'spam'
def test_engine(self):
with self.assertRaises... | 'neato') | modified | eb5c1cfca183bd4e72712a4f26a26a5e7fbf961c961726c7fd90b6b14f0e704d | self.assertEqual|test_init|# test_files.py import unittest from graphviz.files import File class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaises(ValueError): self.file.format = 'spam' def test_engine(self): with self.assertRaises(ValueError): self.file.engi... | 'neato') | 32 | 8 |
xflr6/graphviz | train | 1 | f1dc5b468f09572cea96c171b3fd7f2612c84118 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 33 | 8 | self.assertEqual | test_init | # test_files.py
import unittest
from graphviz.files import File
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaises(ValueError):
self.file.format = 'spam'
def test_engine(self):
with self.assertRaises... | 'latin1') | modified | b1874eeba86fca204d00f86f1e8c2fc7a0354b47286004cff4bd897d09131dad | self.assertEqual|test_init|# test_files.py import unittest from graphviz.files import File class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaises(ValueError): self.file.format = 'spam' def test_engine(self): with self.assertRaises(ValueError): self.file.engi... | 'latin1') | 33 | 8 |
xflr6/graphviz | train | 1 | f1dc5b468f09572cea96c171b3fd7f2612c84118 | train | tests/test_lang.py | train | xflr6/graphviz:tests/test_lang.py | 17 | 8 | self.assertEqual | test_attributes_pairs | # test_lang.py
import unittest
from graphviz.lang import quote, attributes
class TestQuote(unittest.TestCase):
def test_quote_quotes(self):
self.assertEqual(quote('"spam"'), r'"\"spam\""')
class TestAttributes(unittest.TestCase):
def test_attributes_pairs(self):
self.assertEqual(attribut... | ' [spam=eggs]') | added | 20914e825cb1f4c7210e946305e3a5b9de2972a037505a32ed13e0e9829097bb | self.assertEqual|test_attributes_pairs|# test_lang.py import unittest from graphviz.lang import quote, attributes class TestQuote(unittest.TestCase): def test_quote_quotes(self): self.assertEqual(quote('"spam"'), r'"\"spam\""') class TestAttributes(unittest.TestCase): def test_attributes_pairs(self): self.assertEqual(a... | null | null | null |
xflr6/graphviz | train | 1 | f1dc5b468f09572cea96c171b3fd7f2612c84118 | train | tests/test_lang.py | train | xflr6/graphviz:tests/test_lang.py | 21 | 8 | self.assertEqual | test_attributes_map | # test_lang.py
import unittest
from graphviz.lang import quote, attributes
class TestQuote(unittest.TestCase):
def test_quote_quotes(self):
self.assertEqual(quote('"spam"'), r'"\"spam\""')
class TestAttributes(unittest.TestCase):
def test_attributes_pairs(self):
self.assertEqual(attribut... | ' [spam=eggs]') | added | 54806c1ed3c2242eede0ba50ac7970cc398e742d47e8bb1422d2c60ba7228dcb | self.assertEqual|test_attributes_map|# test_lang.py import unittest from graphviz.lang import quote, attributes class TestQuote(unittest.TestCase): def test_quote_quotes(self): self.assertEqual(quote('"spam"'), r'"\"spam\""') class TestAttributes(unittest.TestCase): def test_attributes_pairs(self): self.assertEqual(att... | null | null | null |
xflr6/graphviz | train | 1 | f1dc5b468f09572cea96c171b3fd7f2612c84118 | train | tests/test_lang.py | train | xflr6/graphviz:tests/test_lang.py | 25 | 8 | self.assertEqual | test_attributes_raw | # test_lang.py
import unittest
from graphviz.lang import quote, attributes
class TestQuote(unittest.TestCase):
def test_quote_quotes(self):
self.assertEqual(quote('"spam"'), r'"\"spam\""')
class TestAttributes(unittest.TestCase):
def test_attributes_pairs(self):
self.assertEqual(attribut... | ' [spam]') | added | 486d7ae131231cf65297bd113441dae6b15926054c3a672eb5a0faa599a298d7 | self.assertEqual|test_attributes_raw|# test_lang.py import unittest from graphviz.lang import quote, attributes class TestQuote(unittest.TestCase): def test_quote_quotes(self): self.assertEqual(quote('"spam"'), r'"\"spam\""') class TestAttributes(unittest.TestCase): def test_attributes_pairs(self): self.assertEqual(att... | null | null | null |
xflr6/graphviz | train | 1 | f1dc5b468f09572cea96c171b3fd7f2612c84118 | train | tests/test_tools.py | train | xflr6/graphviz:tests/test_tools.py | 19 | 8 | self.assertEqual | test_cwd | # test_tools.py
import unittest
import os
from graphviz.tools import mkdirs
class TestMkdirs(unittest.TestCase):
@staticmethod
def _dirnames(path=os.curdir):
return [name for name in os.listdir(path) if os.path.isdir(name)]
def test_cwd(self):
dirnames = self._dirnames()
mkdir... | dirnames) | added | 587e7e3952fa017ef054653f29c5cf6c8a008ca3584a9343151341434793968e | self.assertEqual|test_cwd|# test_tools.py import unittest import os from graphviz.tools import mkdirs class TestMkdirs(unittest.TestCase): @staticmethod def _dirnames(path=os.curdir): return [name for name in os.listdir(path) if os.path.isdir(name)] def test_cwd(self): dirnames = self._dirnames() mkdirs('setup.py') sel... | null | null | null |
xflr6/graphviz | train | 1 | f1dc5b468f09572cea96c171b3fd7f2612c84118 | train | tests/test_tools.py | train | xflr6/graphviz:tests/test_tools.py | 22 | 13 | self.assertRaises | test_file | # test_tools.py
import unittest
import os
from graphviz.tools import mkdirs
class TestMkdirs(unittest.TestCase):
@staticmethod
def _dirnames(path=os.curdir):
return [name for name in os.listdir(path) if os.path.isdir(name)]
def test_cwd(self):
dirnames = self._dirnames()
mkdir... | OSError) | added | c5d846e8144f85433d3b97cb0475df0068fa973a4635dc53ccf177dbec90ccda | self.assertRaises|test_file|# test_tools.py import unittest import os from graphviz.tools import mkdirs class TestMkdirs(unittest.TestCase): @staticmethod def _dirnames(path=os.curdir): return [name for name in os.listdir(path) if os.path.isdir(name)] def test_cwd(self): dirnames = self._dirnames() mkdirs('setup.py') s... | null | null | null |
xflr6/graphviz | train | 2 | 19159bcfb87facda998e744befe7175ebd82c070 | train | tests/test_lang.py | train | xflr6/graphviz:tests/test_lang.py | 15 | 8 | self.assertEqual | test_quote_keyword | # test_lang.py
import unittest
from graphviz.lang import quote, attributes
class TestQuote(unittest.TestCase):
def test_quote_quotes(self):
self.assertEqual(quote('"spam"'), r'"\"spam\""')
def test_quote_keyword(self):
self.assertEqual(quote('node'), '"node"')
self.assertEqual(quot... | '"EDGE"') | added | 286c2ae1176c434673da498c5dcddfb98426815d52c60767995b18350c802500 | self.assertEqual|test_quote_keyword|# test_lang.py import unittest from graphviz.lang import quote, attributes class TestQuote(unittest.TestCase): def test_quote_quotes(self): self.assertEqual(quote('"spam"'), r'"\"spam\""') def test_quote_keyword(self): self.assertEqual(quote('node'), '"node"') self.assertEqual(quote(... | null | null | null |
xflr6/graphviz | train | 2 | 19159bcfb87facda998e744befe7175ebd82c070 | train | tests/test_lang.py | train | xflr6/graphviz:tests/test_lang.py | 22 | 8 | self.assertEqual | test_attributes_pairs | # test_lang.py
import unittest
from graphviz.lang import quote, attributes
class TestQuote(unittest.TestCase):
def test_quote_quotes(self):
self.assertEqual(quote('"spam"'), r'"\"spam\""')
def test_quote_keyword(self):
self.assertEqual(quote('node'), '"node"')
self.assertEqual(quot... | ' [spam=eggs]') | added | b87262f5b1772604408801da6c9090db66b641cfc64f48bd924173f194fa0797 | self.assertEqual|test_attributes_pairs|# test_lang.py import unittest from graphviz.lang import quote, attributes class TestQuote(unittest.TestCase): def test_quote_quotes(self): self.assertEqual(quote('"spam"'), r'"\"spam\""') def test_quote_keyword(self): self.assertEqual(quote('node'), '"node"') self.assertEqual(quo... | null | null | null |
xflr6/graphviz | train | 2 | 19159bcfb87facda998e744befe7175ebd82c070 | train | tests/test_lang.py | train | xflr6/graphviz:tests/test_lang.py | 26 | 8 | self.assertEqual | test_attributes_map | # test_lang.py
import unittest
from graphviz.lang import quote, attributes
class TestQuote(unittest.TestCase):
def test_quote_quotes(self):
self.assertEqual(quote('"spam"'), r'"\"spam\""')
def test_quote_keyword(self):
self.assertEqual(quote('node'), '"node"')
self.assertEqual(quot... | ' [spam=eggs]') | added | 3974f58a39a2ddf0389a123802b8d8bdc3fbc01e918d39c8d354bc47f11cb919 | self.assertEqual|test_attributes_map|# test_lang.py import unittest from graphviz.lang import quote, attributes class TestQuote(unittest.TestCase): def test_quote_quotes(self): self.assertEqual(quote('"spam"'), r'"\"spam\""') def test_quote_keyword(self): self.assertEqual(quote('node'), '"node"') self.assertEqual(quote... | null | null | null |
xflr6/graphviz | train | 2 | 19159bcfb87facda998e744befe7175ebd82c070 | train | tests/test_lang.py | train | xflr6/graphviz:tests/test_lang.py | 30 | 8 | self.assertEqual | test_attributes_raw | # test_lang.py
import unittest
from graphviz.lang import quote, attributes
class TestQuote(unittest.TestCase):
def test_quote_quotes(self):
self.assertEqual(quote('"spam"'), r'"\"spam\""')
def test_quote_keyword(self):
self.assertEqual(quote('node'), '"node"')
self.assertEqual(quot... | ' [spam]') | added | 46efd24c8c36dbbe462fb28b0e6611e47f8453d767e47259637939e1632ba5af | self.assertEqual|test_attributes_raw|# test_lang.py import unittest from graphviz.lang import quote, attributes class TestQuote(unittest.TestCase): def test_quote_quotes(self): self.assertEqual(quote('"spam"'), r'"\"spam\""') def test_quote_keyword(self): self.assertEqual(quote('node'), '"node"') self.assertEqual(quote... | null | null | null |
xflr6/graphviz | train | 3 | 4c8951bc451995ba88109303d60005f506708918 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 30 | 8 | self.assertEqual | test_init | # test_files.py
import unittest
from graphviz.files import File
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, 'format'):
self.file.format = 'spam'
def test_engine(self):
with s... | 'name') | modified | 1f3c6556ac037131547fed886700430271f14ee1fee1b143ca4d09231a0460f8 | self.assertEqual|test_init|# test_files.py import unittest from graphviz.files import File class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, 'format'): self.file.format = 'spam' def test_engine(self): with self.assertRaisesRegexp(Value... | 'name') | 30 | 8 |
xflr6/graphviz | train | 3 | 4c8951bc451995ba88109303d60005f506708918 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 32 | 8 | self.assertEqual | test_init | # test_files.py
import unittest
from graphviz.files import File
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, 'format'):
self.file.format = 'spam'
def test_engine(self):
with s... | 'neato') | modified | 043b45fb2d132895ed8eb05198125f42692ba03d6063db735ae5a23d48dd8c5a | self.assertEqual|test_init|# test_files.py import unittest from graphviz.files import File class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, 'format'): self.file.format = 'spam' def test_engine(self): with self.assertRaisesRegexp(Value... | 'neato') | 32 | 8 |
xflr6/graphviz | train | 3 | 4c8951bc451995ba88109303d60005f506708918 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 33 | 8 | self.assertEqual | test_init | # test_files.py
import unittest
from graphviz.files import File
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, 'format'):
self.file.format = 'spam'
def test_engine(self):
with s... | 'latin1') | modified | ffb96f8bee947bbd3e505077638c85e8eec5c4576849742990b61d2561a111a1 | self.assertEqual|test_init|# test_files.py import unittest from graphviz.files import File class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, 'format'): self.file.format = 'spam' def test_engine(self): with self.assertRaisesRegexp(Value... | 'latin1') | 33 | 8 |
xflr6/graphviz | train | 4 | 4b6706db71d4539f1be57c8adda92df0e590f35b | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 11 | 13 | self.assertRaises | test_attr | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_attr(self):
with self.assertRaises( | ValueError) | added | c1ed26af97721a0393ac5ae3dda70e3a8ffdd77d21a484c352493db508a02012 | self.assertRaises|test_attr|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_attr(self): with self.assertRaises( | null | null | null |
xflr6/graphviz | train | 4 | 4b6706db71d4539f1be57c8adda92df0e590f35b | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 15 | 13 | self.assertRaises | test_subgraph_invalid | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_attr(self):
with self.assertRaises(ValueError):
Graph().attr('spam')
def test_subgraph_invalid(self):
with self.assertRaises( | ValueError) | added | 7376671b37a9927f961f78aa71c67a8e0947d7b2744db7e28505aa040a5ad0d7 | self.assertRaises|test_subgraph_invalid|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_attr(self): with self.assertRaises(ValueError): Graph().attr('spam') def test_subgraph_invalid(self): with self.assertRaises( | null | null | null |
xflr6/graphviz | train | 4 | 4b6706db71d4539f1be57c8adda92df0e590f35b | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 24 | 8 | self.assertEqual | test_subgraph_recursive | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_attr(self):
with self.assertRaises(ValueError):
Graph().attr('spam')
def test_subgraph_invalid(self):
with self.assertRaises(ValueError):
Graph().subgrap... | 'graph {\n\tsubgraph {\n\t}\n}') | added | 087382544940db995bd796191a4671e4b0a9e11ea8fcc2bbab05dabdff0abedb | self.assertEqual|test_subgraph_recursive|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_attr(self): with self.assertRaises(ValueError): Graph().attr('spam') def test_subgraph_invalid(self): with self.assertRaises(ValueError): Graph().subgraph(Digraph()) ... | null | null | null |
xflr6/graphviz | train | 4 | 4b6706db71d4539f1be57c8adda92df0e590f35b | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 47 | 8 | self.assertEqual | test_subgraph | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_attr(self):
with self.assertRaises(ValueError):
Graph().attr('spam')
def test_subgraph_invalid(self):
with self.assertRaises(ValueError):
Graph().subgrap... | '''graph { subgraph { A B C A -- B [constraint=false] A -- C B -- C } subgraph { D E F D -- E [constraint=false] D -- F E -- F } edge [style=dashed] A -- D B -- E C -- F }''') | added | 32754f13d164baeda35938145b314a0e415183124a54cbd734dd04db6bbede86 | self.assertEqual|test_subgraph|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_attr(self): with self.assertRaises(ValueError): Graph().attr('spam') def test_subgraph_invalid(self): with self.assertRaises(ValueError): Graph().subgraph(Digraph()) with self.... | null | null | null |
xflr6/graphviz | train | 5 | cbfaff037d323ab828ed885d3772069833a272f4 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 110 | 8 | self.assertEqual | test_label_html | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_attr(self):
with self.assertRaises(ValueError):
Graph().attr('spam')
def test_subgraph_invalid(self):
with self.assertRaises(ValueError):
Graph().subgrap... | '''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>... | added | 23f9cdf0277d28a5de2e17aef9b9a374bd640206a867138befd8ecc6289ed1a4 | self.assertEqual|test_label_html|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_attr(self): with self.assertRaises(ValueError): Graph().attr('spam') def test_subgraph_invalid(self): with self.assertRaises(ValueError): Graph().subgraph(Digraph()) with sel... | null | null | null |
xflr6/graphviz | train | 6 | 414f2a22c4aca6e6cb6095a199683e82a7e72557 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 15 | 13 | self.assertRaises | test_attr | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr(self):
with self.assertRaises( | ValueError) | added | 342c1a069ee67690d4f4060a03a749239ed357b21f4af01c5fef6675e7e22ebf | self.assertRaises|test_attr|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr(self): with self.assertRaises( | null | null | null |
xflr6/graphviz | train | 6 | 414f2a22c4aca6e6cb6095a199683e82a7e72557 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 22 | 13 | self.assertRaises | test_subgraph_invalid | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr(self):
with self.assertRaises(ValueError):
... | ValueError) | added | 21d9840624dba39d31523fd450c988afa9d3c9f99d860c0cbf7e8c8482156f63 | self.assertRaises|test_subgraph_invalid|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr(self): with self.assertRaises(ValueError): Graph().attr... | null | null | null |
xflr6/graphviz | train | 6 | 414f2a22c4aca6e6cb6095a199683e82a7e72557 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 28 | 8 | self.assertEqual | test_subgraph_recursive | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr(self):
with self.assertRaises(ValueError):
... | 'graph {\n\tsubgraph {\n\t}\n}') | added | 49fe97af49e051128133820bc85a1f7ca224a42bdac9b89af5f3605e5f9d45e4 | self.assertEqual|test_subgraph_recursive|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr(self): with self.assertRaises(ValueError): Graph().att... | null | null | null |
xflr6/graphviz | train | 6 | 414f2a22c4aca6e6cb6095a199683e82a7e72557 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 114 | 8 | self.assertEqual | test_label_html | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr(self):
with self.assertRaises(ValueError):
... | '''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>... | added | 2584756500f8abf95b3b1d0887016be72ab5912b030a65e29fc4c4bf85526f82 | self.assertEqual|test_label_html|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr(self): with self.assertRaises(ValueError): Graph().attr('spam'... | null | null | null |
xflr6/graphviz | train | 7 | 69a3835f2861c7d2d3ca4b4dd4e782921a8a51db | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 30 | 8 | self.assertEqual | test_init | # test_files.py
import unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, 'format'):
self.file.format = 'spam'
def test_engine(self):
... | 'name') | modified | 93d25c6cf95a364bb79a66806fb3e4bc0653a160a3d430cb63218067f9271a11 | self.assertEqual|test_init|# test_files.py import unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, 'format'): self.file.format = 'spam' def test_engine(self): with self.assertRaisesRege... | 'name') | 30 | 8 |
xflr6/graphviz | train | 7 | 69a3835f2861c7d2d3ca4b4dd4e782921a8a51db | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 32 | 8 | self.assertEqual | test_init | # test_files.py
import unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, 'format'):
self.file.format = 'spam'
def test_engine(self):
... | 'neato') | modified | 81e1eea34dfee0e730ef4ab15307b314020873988874c3037e27b8041e909802 | self.assertEqual|test_init|# test_files.py import unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, 'format'): self.file.format = 'spam' def test_engine(self): with self.assertRaisesRege... | 'neato') | 32 | 8 |
xflr6/graphviz | train | 7 | 69a3835f2861c7d2d3ca4b4dd4e782921a8a51db | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 33 | 8 | self.assertEqual | test_init | # test_files.py
import unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, 'format'):
self.file.format = 'spam'
def test_engine(self):
... | 'latin1') | modified | 6aedf0bb5022600b7036c7f1c5e0e63714f3820ea6a4544f71e8ac16ce2767cf | self.assertEqual|test_init|# test_files.py import unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, 'format'): self.file.format = 'spam' def test_engine(self): with self.assertRaisesRege... | 'latin1') | 33 | 8 |
xflr6/graphviz | train | 7 | 69a3835f2861c7d2d3ca4b4dd4e782921a8a51db | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 62 | 8 | self.assertEqual | test_init | # test_files.py
import unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, 'format'):
self.file.format = 'spam'
def test_engine(self):
... | source) | added | 6183b5d9246635a0d57df7e90d374639f588428db87b64216c84313282dce101 | self.assertEqual|test_init|# test_files.py import unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, 'format'): self.file.format = 'spam' def test_engine(self): with self.assertRaisesRege... | null | null | null |
xflr6/graphviz | train | 8 | 2c41c0cac0ff97fb29f3421c68f1273e3c318445 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 51 | 8 | self.assertEqual | test_subgraph | # test_dot.py
import unittest2 as unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr(self):
with self.assertRaises(ValueError... | '''graph { subgraph { A B C A -- B [constraint=false] A -- C B -- C } subgraph { D E F D -- E [constraint=false] D -- F E -- F } edge [style=dashed] A -- D B -- E C -- F }''') | modified | 7056b5ff4c3aded716d93eafa085d1933901eb5438acf4706dbc871c7faf7d8e | self.assertEqual|test_subgraph|# test_dot.py import unittest2 as unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr(self): with self.assertRaises(ValueError): Graph().... | '''graph { subgraph { A B C A -- B [constraint=false] A -- C B -- C } subgraph { D E F D -- E [constraint=false] D -- F E -- F } edge [style=dashed] A -- D B -- E C -- F }''') | 51 | 8 |
xflr6/graphviz | train | 8 | 2c41c0cac0ff97fb29f3421c68f1273e3c318445 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 114 | 8 | self.assertEqual | test_label_html | # test_dot.py
import unittest2 as unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr(self):
with self.assertRaises(ValueError... | '''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 | 7ecb698028cf7c5e96bc3f3b5930c5611e3709b838c8c5e4bc3aa5010d5bda0f | self.assertEqual|test_label_html|# test_dot.py import unittest2 as unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr(self): with self.assertRaises(ValueError): Graph(... | '''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>... | 114 | 8 |
xflr6/graphviz | train | 8 | 2c41c0cac0ff97fb29f3421c68f1273e3c318445 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 30 | 8 | self.assertEqual | test_init | # test_files.py
import unittest2 as unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, 'format'):
self.file.format = 'spam'
def test_engine(... | 'name') | modified | bac3dcf5c8649826ebde410132b6a5846a4a895a4eeab4e6b16110536919072e | self.assertEqual|test_init|# test_files.py import unittest2 as unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, 'format'): self.file.format = 'spam' def test_engine(self): with self.ass... | 'name') | 30 | 8 |
xflr6/graphviz | train | 8 | 2c41c0cac0ff97fb29f3421c68f1273e3c318445 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 33 | 8 | self.assertEqual | test_init | # test_files.py
import unittest2 as unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, 'format'):
self.file.format = 'spam'
def test_engine(... | 'latin1') | modified | 0a40b08fb6627a9509a6b25c88066d9ef54ceae294c3ddd45ff876132a12fdca | self.assertEqual|test_init|# test_files.py import unittest2 as unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, 'format'): self.file.format = 'spam' def test_engine(self): with self.ass... | 'latin1') | 33 | 8 |
xflr6/graphviz | train | 8 | 2c41c0cac0ff97fb29f3421c68f1273e3c318445 | train | tests/test_lang.py | train | xflr6/graphviz:tests/test_lang.py | 11 | 8 | self.assertEqual | test_quote_quotes | # test_lang.py
import unittest2 as unittest
from graphviz.lang import quote, attributes
class TestQuote(unittest.TestCase):
def test_quote_quotes(self):
self.assertEqual(quote('"spam"'), | r'"\"spam\""') | modified | 23fc27fc39b80ac08d33254e62c4f442de0c31f81f5b424f028367f2bbc075a7 | self.assertEqual|test_quote_quotes|# test_lang.py import unittest2 as unittest from graphviz.lang import quote, attributes class TestQuote(unittest.TestCase): def test_quote_quotes(self): self.assertEqual(quote('"spam"'), | r'"\"spam\""') | 11 | 8 |
xflr6/graphviz | train | 8 | 2c41c0cac0ff97fb29f3421c68f1273e3c318445 | train | tests/test_lang.py | train | xflr6/graphviz:tests/test_lang.py | 30 | 8 | self.assertEqual | test_attributes_raw | # test_lang.py
import unittest2 as unittest
from graphviz.lang import quote, attributes
class TestQuote(unittest.TestCase):
def test_quote_quotes(self):
self.assertEqual(quote('"spam"'), r'"\"spam\""')
def test_quote_keyword(self):
self.assertEqual(quote('node'), '"node"')
self.ass... | ' [spam]') | modified | 2174639dd5d32f3ac74024423dd28115d3f22a134f2842d945b400f117121f6d | self.assertEqual|test_attributes_raw|# test_lang.py import unittest2 as unittest from graphviz.lang import quote, attributes class TestQuote(unittest.TestCase): def test_quote_quotes(self): self.assertEqual(quote('"spam"'), r'"\"spam\""') def test_quote_keyword(self): self.assertEqual(quote('node'), '"node"') self.asse... | ' [spam]') | 30 | 8 |
xflr6/graphviz | train | 8 | 2c41c0cac0ff97fb29f3421c68f1273e3c318445 | train | tests/test_tools.py | train | xflr6/graphviz:tests/test_tools.py | 18 | 8 | self.assertEqual | test_cwd | # test_tools.py
import unittest2 as unittest
import os
from graphviz.tools import mkdirs
class TestMkdirs(unittest.TestCase):
@staticmethod
def _dirnames(path=os.curdir):
return [name for name in os.listdir(path) if os.path.isdir(name)]
def test_cwd(self):
dirnames = self._dirnames()
... | dirnames) | modified | 0a67fed660a46531cb3a97a509da8b88e8d8683a796b9d4d3d89e12c2cc7a60e | self.assertEqual|test_cwd|# test_tools.py import unittest2 as unittest import os from graphviz.tools import mkdirs class TestMkdirs(unittest.TestCase): @staticmethod def _dirnames(path=os.curdir): return [name for name in os.listdir(path) if os.path.isdir(name)] def test_cwd(self): dirnames = self._dirnames() mkdirs('s... | dirnames) | 18 | 8 |
xflr6/graphviz | train | 8 | 2c41c0cac0ff97fb29f3421c68f1273e3c318445 | train | tests/test_tools.py | train | xflr6/graphviz:tests/test_tools.py | 21 | 13 | self.assertRaises | test_file | # test_tools.py
import unittest2 as unittest
import os
from graphviz.tools import mkdirs
class TestMkdirs(unittest.TestCase):
@staticmethod
def _dirnames(path=os.curdir):
return [name for name in os.listdir(path) if os.path.isdir(name)]
def test_cwd(self):
dirnames = self._dirnames()
... | OSError) | modified | 8b2b959b42ef3884e5190033f07dd96096882567fd7e5719352ba80a372d77c1 | self.assertRaises|test_file|# test_tools.py import unittest2 as unittest import os from graphviz.tools import mkdirs class TestMkdirs(unittest.TestCase): @staticmethod def _dirnames(path=os.curdir): return [name for name in os.listdir(path) if os.path.isdir(name)] def test_cwd(self): dirnames = self._dirnames() mkdirs(... | OSError) | 21 | 13 |
xflr6/graphviz | train | 9 | f0262cff73c9b75a75dc0590b5c54ff17a4f5914 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 31 | 8 | self.assertEqual | test_init | # test_files.py
import os
import unittest2 as unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, 'format'):
self.file.format = 'spam'
def te... | 'name') | modified | b1f386297c0b63ade3649e3850808d138448857e58d0620b886260fb5a772a6f | self.assertEqual|test_init|# test_files.py import os import unittest2 as unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, 'format'): self.file.format = 'spam' def test_engine(self): wit... | 'name') | 30 | 8 |
xflr6/graphviz | train | 9 | f0262cff73c9b75a75dc0590b5c54ff17a4f5914 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 33 | 8 | self.assertEqual | test_init | # test_files.py
import os
import unittest2 as unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, 'format'):
self.file.format = 'spam'
def te... | 'neato') | modified | f1d24ded9b3308bd6c260d0ab70d320c7a0d09743448a24b8cc373b1591459f0 | self.assertEqual|test_init|# test_files.py import os import unittest2 as unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, 'format'): self.file.format = 'spam' def test_engine(self): wit... | 'neato') | 32 | 8 |
xflr6/graphviz | train | 9 | f0262cff73c9b75a75dc0590b5c54ff17a4f5914 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 34 | 8 | self.assertEqual | test_init | # test_files.py
import os
import unittest2 as unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, 'format'):
self.file.format = 'spam'
def te... | 'latin1') | modified | 0be64fee7c0a4671ebbc332a36b37c07c5d1223e14eda73352b2d73569c2d8c2 | self.assertEqual|test_init|# test_files.py import os import unittest2 as unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, 'format'): self.file.format = 'spam' def test_engine(self): wit... | 'latin1') | 33 | 8 |
xflr6/graphviz | train | 9 | f0262cff73c9b75a75dc0590b5c54ff17a4f5914 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 65 | 8 | self.assertEqual | test_init | # test_files.py
import os
import unittest2 as unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, 'format'):
self.file.format = 'spam'
def te... | source) | added | 5863e435931b1e0a35ab4331d47ab06599f6074c9277ae592411f63188cb6b15 | self.assertEqual|test_init|# test_files.py import os import unittest2 as unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, 'format'): self.file.format = 'spam' def test_engine(self): wit... | null | null | null |
xflr6/graphviz | train | 10 | 06af6e41d1fd9f8ff3e832438dbc612ef7c51c55 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 20 | 8 | self.assertEqual | test_strict | # test_dot.py
import unittest2 as unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr(self):
with self.assertRaises(ValueError... | 'strict digraph {\n}') | added | 65b91111be5322f4aca7c283c0874f7ab74b5fb7d9efb082aced3f16b57642d6 | self.assertEqual|test_strict|# test_dot.py import unittest2 as unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr(self): with self.assertRaises(ValueError): Graph().at... | null | null | null |
xflr6/graphviz | train | 10 | 06af6e41d1fd9f8ff3e832438dbc612ef7c51c55 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 26 | 13 | self.assertRaises | test_subgraph_invalid | # test_dot.py
import unittest2 as unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr(self):
with self.assertRaises(ValueError... | ValueError) | added | a28f58de407be57ba310e6c927cb33cd3c6dfdba506195cd87f55122978e76bd | self.assertRaises|test_subgraph_invalid|# test_dot.py import unittest2 as unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr(self): with self.assertRaises(ValueError):... | null | null | null |
xflr6/graphviz | train | 10 | 06af6e41d1fd9f8ff3e832438dbc612ef7c51c55 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 55 | 8 | self.assertEqual | test_subgraph | # test_dot.py
import unittest2 as unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr(self):
with self.assertRaises(ValueError... | '''graph { subgraph { A B C A -- B [constraint=false] A -- C B -- C } subgraph { D E F D -- E [constraint=false] D -- F E -- F } edge [style=dashed] A -- D B -- E C -- F }''') | added | 408d45fc1371b9031fdf1637e891ec1ea82155d1b309a94b31a1797efed60a76 | self.assertEqual|test_subgraph|# test_dot.py import unittest2 as unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr(self): with self.assertRaises(ValueError): Graph().... | null | null | null |
xflr6/graphviz | train | 10 | 06af6e41d1fd9f8ff3e832438dbc612ef7c51c55 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 118 | 8 | self.assertEqual | test_label_html | # test_dot.py
import unittest2 as unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr(self):
with self.assertRaises(ValueError... | '''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>... | added | 99f7f76f021f8b93e04e7f07f2aaabeb5d4a36ef02993e43cfd8fdc3eb63345d | self.assertEqual|test_label_html|# test_dot.py import unittest2 as unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr(self): with self.assertRaises(ValueError): Graph(... | null | null | null |
xflr6/graphviz | train | 11 | a2eb0d933c278e74c7d7601ea9b490f171fee2eb | train | tests/test_tools.py | train | xflr6/graphviz:tests/test_tools.py | 26 | 8 | assert | # test_tools.py
import unittest2 as unittest
import os
import shutil
import tempfile
import functools
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 != '.' el... | not self._dentries() | added | 8716f1985058005da2d5d291af3bbd2755143d3d5d4e48f88b0a0962988e9ee6 | assert||# test_tools.py import unittest2 as unittest import os import shutil import tempfile import functools 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_fi... | null | null | null | |
xflr6/graphviz | train | 11 | a2eb0d933c278e74c7d7601ea9b490f171fee2eb | train | tests/test_tools.py | train | xflr6/graphviz:tests/test_tools.py | 41 | 12 | self.assertEqual | test_mkdirs | # test_tools.py
import unittest2 as unittest
import os
import shutil
import tempfile
import functools
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 != '.' el... | [(False, 'spam'), (False, 'spam/eggs')]) | added | e5e7b17409a4cf75e77009db741147a6d20a6dd66064928153f52fe335dde3cd | self.assertEqual|test_mkdirs|# test_tools.py import unittest2 as unittest import os import shutil import tempfile import functools 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 != '... | null | null | null |
xflr6/graphviz | train | 11 | a2eb0d933c278e74c7d7601ea9b490f171fee2eb | train | tests/test_tools.py | train | xflr6/graphviz:tests/test_tools.py | 47 | 13 | self.assertRaises | test_mkdirs_invalid | # test_tools.py
import unittest2 as unittest
import os
import shutil
import tempfile
import functools
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 != '.' el... | OSError) | added | 5f7443f42229858afa73b8684df07300498df7c09240b4da1f141e1c9a87b229 | self.assertRaises|test_mkdirs_invalid|# test_tools.py import unittest2 as unittest import os import shutil import tempfile import functools 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 ... | null | null | null |
xflr6/graphviz | train | 12 | 9e47fc0f43faa2d4bc5fa61fc89745e2b2ada52f | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 23 | 13 | self.assertRaises | test_subgraph_invalid | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr(self):
with self.assertRaises(ValueError):
... | ValueError) | modified | a0beba54a381409d8c92e9c6d3c1352ab0b4282cfb220a99fb54006f935f3cb6 | self.assertRaises|test_subgraph_invalid|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr(self): with self.assertRaises(ValueError): Graph().attr... | ValueError) | 23 | 13 |
xflr6/graphviz | train | 12 | 9e47fc0f43faa2d4bc5fa61fc89745e2b2ada52f | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 32 | 8 | self.assertEqual | test_subgraph_recursive | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr(self):
with self.assertRaises(ValueError):
... | 'graph {\n\tsubgraph {\n\t}\n}') | modified | 15117963119c9ad15fd0ac82cf7e2ff1c76004f2e3b1275229e40d8692713c0f | self.assertEqual|test_subgraph_recursive|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr(self): with self.assertRaises(ValueError): Graph().att... | 'graph {\n\tsubgraph {\n\t}\n}') | 32 | 8 |
xflr6/graphviz | train | 12 | 9e47fc0f43faa2d4bc5fa61fc89745e2b2ada52f | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 31 | 8 | self.assertEqual | test_init | # test_files.py
import os
import unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, 'format'):
self.file.format = 'spam'
def test_engine(sel... | 'name') | modified | b7cdcfab3a1e169c1a8f1581b9fe1aedf6bcc6804ef21ae7c7d396fe610d5e0f | self.assertEqual|test_init|# test_files.py import os import unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, 'format'): self.file.format = 'spam' def test_engine(self): with self.assert... | 'name') | 31 | 8 |
xflr6/graphviz | train | 12 | 9e47fc0f43faa2d4bc5fa61fc89745e2b2ada52f | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 34 | 8 | self.assertEqual | test_init | # test_files.py
import os
import unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, 'format'):
self.file.format = 'spam'
def test_engine(sel... | 'latin1') | modified | 0780d5a468943787461760e3b3afad0f7890936eb1a73e0b7ee05daef47e0756 | self.assertEqual|test_init|# test_files.py import os import unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, 'format'): self.file.format = 'spam' def test_engine(self): with self.assert... | 'latin1') | 34 | 8 |
xflr6/graphviz | train | 12 | 9e47fc0f43faa2d4bc5fa61fc89745e2b2ada52f | train | tests/test_lang.py | train | xflr6/graphviz:tests/test_lang.py | 22 | 8 | self.assertEqual | test_attributes_pairs | # test_lang.py
import unittest
from graphviz.lang import quote, attributes
class TestQuote(unittest.TestCase):
def test_quote_quotes(self):
self.assertEqual(quote('"spam"'), r'"\"spam\""')
def test_quote_keyword(self):
self.assertEqual(quote('node'), '"node"')
self.assertEqual(quot... | ' [spam=eggs]') | modified | 206aa82cafaaab69a871dd6bc22a3b62642304068a21fe9aadd7023281d2bcf8 | self.assertEqual|test_attributes_pairs|# test_lang.py import unittest from graphviz.lang import quote, attributes class TestQuote(unittest.TestCase): def test_quote_quotes(self): self.assertEqual(quote('"spam"'), r'"\"spam\""') def test_quote_keyword(self): self.assertEqual(quote('node'), '"node"') self.assertEqual(quo... | ' [spam=eggs]') | 22 | 8 |
xflr6/graphviz | train | 12 | 9e47fc0f43faa2d4bc5fa61fc89745e2b2ada52f | train | tests/test_lang.py | train | xflr6/graphviz:tests/test_lang.py | 26 | 8 | self.assertEqual | test_attributes_map | # test_lang.py
import unittest
from graphviz.lang import quote, attributes
class TestQuote(unittest.TestCase):
def test_quote_quotes(self):
self.assertEqual(quote('"spam"'), r'"\"spam\""')
def test_quote_keyword(self):
self.assertEqual(quote('node'), '"node"')
self.assertEqual(quot... | ' [spam=eggs]') | modified | 76a2769ed31157518ac70807ad2c9b6bad0dc8ce94db6afcb26b89ccb50b40f8 | self.assertEqual|test_attributes_map|# test_lang.py import unittest from graphviz.lang import quote, attributes class TestQuote(unittest.TestCase): def test_quote_quotes(self): self.assertEqual(quote('"spam"'), r'"\"spam\""') def test_quote_keyword(self): self.assertEqual(quote('node'), '"node"') self.assertEqual(quote... | ' [spam=eggs]') | 26 | 8 |
xflr6/graphviz | train | 12 | 9e47fc0f43faa2d4bc5fa61fc89745e2b2ada52f | train | tests/test_tools.py | train | xflr6/graphviz:tests/test_tools.py | 26 | 8 | assert | # test_tools.py
import unittest
import os
import shutil
import tempfile
import functools
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 '')
... | not self._dentries() | modified | 987e77f20e25c9361320f03bdfe7c756fc33eb8522526fd447a08963f65fb79e | assert||# test_tools.py import unittest import os import shutil import tempfile import functools 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 ... | not self._dentries() | 26 | 8 | |
xflr6/graphviz | train | 12 | 9e47fc0f43faa2d4bc5fa61fc89745e2b2ada52f | train | tests/test_tools.py | train | xflr6/graphviz:tests/test_tools.py | 47 | 13 | self.assertRaises | test_mkdirs_invalid | # test_tools.py
import unittest
import os
import shutil
import tempfile
import functools
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 '')
... | OSError) | modified | 19153d55da3d6407f829c1a205a2b6549ff0d41285fac9ab302faa98cb80fc4f | self.assertRaises|test_mkdirs_invalid|# test_tools.py import unittest import os import shutil import tempfile import functools 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 != '.' e... | OSError) | 47 | 13 |
xflr6/graphviz | train | 13 | ac6dec206bae9ec69bd8a0c69347a0aeccf9bef8 | train | tests/test_lang.py | train | xflr6/graphviz:tests/test_lang.py | 11 | 8 | self.assertEqual | test_quote_quotes | # test_lang.py
import unittest
from graphviz.lang import quote, attr_list
class TestQuote(unittest.TestCase):
def test_quote_quotes(self):
self.assertEqual(quote('"spam"'), | r'"\"spam\""') | modified | b5c6a2db4e72dd2b5fd66dc855f461740b7231e883db7e1a4ed4087d68266d5a | self.assertEqual|test_quote_quotes|# test_lang.py import unittest from graphviz.lang import quote, attr_list class TestQuote(unittest.TestCase): def test_quote_quotes(self): self.assertEqual(quote('"spam"'), | r'"\"spam\""') | 11 | 8 |
xflr6/graphviz | train | 13 | ac6dec206bae9ec69bd8a0c69347a0aeccf9bef8 | train | tests/test_lang.py | train | xflr6/graphviz:tests/test_lang.py | 15 | 8 | self.assertEqual | test_quote_keyword | # test_lang.py
import unittest
from graphviz.lang import quote, attr_list
class TestQuote(unittest.TestCase):
def test_quote_quotes(self):
self.assertEqual(quote('"spam"'), r'"\"spam\""')
def test_quote_keyword(self):
self.assertEqual(quote('node'), '"node"')
self.assertEqual(quote... | '"EDGE"') | modified | 32788db3e0a9a84bd04cff13c8b85bd815a2bd4e53b413aea2920b7af6e7cdef | self.assertEqual|test_quote_keyword|# test_lang.py import unittest from graphviz.lang import quote, attr_list class TestQuote(unittest.TestCase): def test_quote_quotes(self): self.assertEqual(quote('"spam"'), r'"\"spam\""') def test_quote_keyword(self): self.assertEqual(quote('node'), '"node"') self.assertEqual(quote('... | '"EDGE"') | 15 | 8 |
xflr6/graphviz | train | 13 | ac6dec206bae9ec69bd8a0c69347a0aeccf9bef8 | train | tests/test_lang.py | train | xflr6/graphviz:tests/test_lang.py | 22 | 8 | self.assertEqual | test_attributes_pairs | # test_lang.py
import unittest
from graphviz.lang import quote, attr_list
class TestQuote(unittest.TestCase):
def test_quote_quotes(self):
self.assertEqual(quote('"spam"'), r'"\"spam\""')
def test_quote_keyword(self):
self.assertEqual(quote('node'), '"node"')
self.assertEqual(quote... | ' [spam=eggs]') | modified | 89e5ff14e5628aeae56f1c7fa2ab173633052e1aa380c44a94135bb6f41cbe99 | self.assertEqual|test_attributes_pairs|# test_lang.py import unittest from graphviz.lang import quote, attr_list class TestQuote(unittest.TestCase): def test_quote_quotes(self): self.assertEqual(quote('"spam"'), r'"\"spam\""') def test_quote_keyword(self): self.assertEqual(quote('node'), '"node"') self.assertEqual(quot... | ' [spam=eggs]') | 22 | 8 |
xflr6/graphviz | train | 13 | ac6dec206bae9ec69bd8a0c69347a0aeccf9bef8 | train | tests/test_lang.py | train | xflr6/graphviz:tests/test_lang.py | 26 | 8 | self.assertEqual | test_attributes_map | # test_lang.py
import unittest
from graphviz.lang import quote, attr_list
class TestQuote(unittest.TestCase):
def test_quote_quotes(self):
self.assertEqual(quote('"spam"'), r'"\"spam\""')
def test_quote_keyword(self):
self.assertEqual(quote('node'), '"node"')
self.assertEqual(quote... | ' [spam=eggs]') | modified | 47b6f7a596fa819300fb51857c4307c62b7fa2742dc21bcc85319baec8aaf184 | self.assertEqual|test_attributes_map|# test_lang.py import unittest from graphviz.lang import quote, attr_list class TestQuote(unittest.TestCase): def test_quote_quotes(self): self.assertEqual(quote('"spam"'), r'"\"spam\""') def test_quote_keyword(self): self.assertEqual(quote('node'), '"node"') self.assertEqual(quote(... | ' [spam=eggs]') | 26 | 8 |
xflr6/graphviz | train | 14 | 9a2a6c9346572ae2fc78a7ecd132ca93c1c33a79 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 12 | 13 | self.assertRaises | test_render_missing_file | # test_backend.py
import unittest
import subprocess
from graphviz.backend import render, pipe
class TestRender(unittest.TestCase):
def test_render_missing_file(self):
with self.assertRaises( | subprocess.CalledProcessError) | added | d3364e5b1093aec3c1442f8e9bd1a02c13fc15ff5d58f0ccb7dbb7e04b5cb5d7 | self.assertRaises|test_render_missing_file|# test_backend.py import unittest import subprocess from graphviz.backend import render, pipe class TestRender(unittest.TestCase): def test_render_missing_file(self): with self.assertRaises( | null | null | null |
xflr6/graphviz | train | 14 | 9a2a6c9346572ae2fc78a7ecd132ca93c1c33a79 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 20 | 13 | self.assertRaises | test_pipe_invalid_dot | # test_backend.py
import unittest
import subprocess
from graphviz.backend import render, pipe
class TestRender(unittest.TestCase):
def test_render_missing_file(self):
with self.assertRaises(subprocess.CalledProcessError) as c:
render('dot', 'pdf', 'doesnotexist')
self.assertEqual(c.... | subprocess.CalledProcessError) | added | 7da72a0b50f3e74f4c9a6b07e48e77b7a4ba1ffaabdb72d9d8ff638afbaf5da5 | self.assertRaises|test_pipe_invalid_dot|# test_backend.py import unittest import subprocess from graphviz.backend import render, pipe class TestRender(unittest.TestCase): def test_render_missing_file(self): with self.assertRaises(subprocess.CalledProcessError) as c: render('dot', 'pdf', 'doesnotexist') self.assertEqual... | null | null | null |
xflr6/graphviz | train | 15 | 2b93fd9b7e796773200bd35f1b947be008f1460a | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 30 | 13 | self.assertRaises | test_subgraph_strict | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr(self):
with self.assertRaises(ValueError):
... | ValueError) | added | bb06606dfdeb39c07ef63adfe2fd904a3f5e8998c24d0f25a7b29f92c537b019 | self.assertRaises|test_subgraph_strict|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr(self): with self.assertRaises(ValueError): Graph().attr(... | null | null | null |
xflr6/graphviz | train | 15 | 2b93fd9b7e796773200bd35f1b947be008f1460a | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 39 | 8 | self.assertEqual | test_subgraph_recursive | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr(self):
with self.assertRaises(ValueError):
... | 'graph {\n\tsubgraph {\n\t}\n}') | added | b201df5278bdd3751435dc9e65e942369b0ed9cd4e10ac2c6f88f4a37cba1716 | self.assertEqual|test_subgraph_recursive|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr(self): with self.assertRaises(ValueError): Graph().att... | null | null | null |
xflr6/graphviz | train | 15 | 2b93fd9b7e796773200bd35f1b947be008f1460a | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 62 | 8 | self.assertEqual | test_subgraph | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr(self):
with self.assertRaises(ValueError):
... | '''graph { subgraph { A B C A -- B [constraint=false] A -- C B -- C } subgraph { D E F D -- E [constraint=false] D -- F E -- F } edge [style=dashed] A -- D B -- E C -- F }''') | added | defdf3b06e2ee541941a246eafbc88154f7d85a1c3e02e0133911926d0674e22 | self.assertEqual|test_subgraph|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr(self): with self.assertRaises(ValueError): Graph().attr('spam') ... | null | null | null |
xflr6/graphviz | train | 15 | 2b93fd9b7e796773200bd35f1b947be008f1460a | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 125 | 8 | self.assertEqual | test_label_html | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr(self):
with self.assertRaises(ValueError):
... | '''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>... | added | 223c60c05823a0d45a6daf96778ccf238a8c432214ab86270332fd4acbaa5a3b | self.assertEqual|test_label_html|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr(self): with self.assertRaises(ValueError): Graph().attr('spam'... | null | null | null |
xflr6/graphviz | train | 16 | 0f68368f2b40bb615fdeed976b8d5f813b3d3e31 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 20 | 13 | self.assertRaises | test_attr_invalid | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr_plain(self):
dot = Graph()
dot.attr(spam='egg... | ValueError) | added | 83afb4ac37bb5e5c3df9edefa145e3dd5ce780fef577da270fd5aaaad5a9a98c | self.assertRaises|test_attr_invalid|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr_plain(self): dot = Graph() dot.attr(spam='eggs') self.asser... | null | null | null |
xflr6/graphviz | train | 16 | 0f68368f2b40bb615fdeed976b8d5f813b3d3e31 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 24 | 8 | self.assertEqual | test_strict | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr_plain(self):
dot = Graph()
dot.attr(spam='egg... | 'strict graph {\n}') | added | bc0dc59806034052ab1d28dbb76d9d1c479149b66d65f0640490122ed4ae2c96 | self.assertEqual|test_strict|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr_plain(self): dot = Graph() dot.attr(spam='eggs') self.assertEqual(... | null | null | null |
xflr6/graphviz | train | 16 | 0f68368f2b40bb615fdeed976b8d5f813b3d3e31 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 67 | 8 | self.assertEqual | test_subgraph | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr_plain(self):
dot = Graph()
dot.attr(spam='egg... | '''graph { subgraph { A B C A -- B [constraint=false] A -- C B -- C } subgraph { D E F D -- E [constraint=false] D -- F E -- F } edge [style=dashed] A -- D B -- E C -- F }''') | added | 802efb215b9c2aca8ec3eb4b37e091ca8da823d073bb8111da8a966ff6409ed5 | self.assertEqual|test_subgraph|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr_plain(self): dot = Graph() dot.attr(spam='eggs') self.assertEqua... | null | null | null |
xflr6/graphviz | train | 16 | 0f68368f2b40bb615fdeed976b8d5f813b3d3e31 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 130 | 8 | self.assertEqual | test_label_html | # test_dot.py
import unittest
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self):
self.assertRegexpMatches(Graph('spam')._repr_svg_(),
r'(?s)^<\?xml .+</svg>\s*$')
def test_attr_plain(self):
dot = Graph()
dot.attr(spam='egg... | '''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>... | added | 8bdc5ae0284e73beb487d0c8fcb9e5cac721d22e48101440b4fd2ff438a11f9d | self.assertEqual|test_label_html|# test_dot.py import unittest from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self): self.assertRegexpMatches(Graph('spam')._repr_svg_(), r'(?s)^<\?xml .+</svg>\s*$') def test_attr_plain(self): dot = Graph() dot.attr(spam='eggs') self.assertEq... | null | null | null |
xflr6/graphviz | train | 17 | 46fca02c0a98ef7f90e9664b0ea803659c3c94ed | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 19 | 8 | self.assertEqual | test_iter_strict | # test_dot.py
import unittest
import itertools
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'):
self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern)
def test_iter_subgraph_strict(self):
with sel... | 'strict graph {\n}') | added | aa7be46e5980a7d3e2a325aa3f9fe4dd56f528b1d326792ec0ae36a3a6822cc9 | self.assertEqual|test_iter_strict|# test_dot.py import unittest import itertools from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'): self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern) def test_iter_subgraph_strict(self): with... | null | null | null |
xflr6/graphviz | train | 17 | 46fca02c0a98ef7f90e9664b0ea803659c3c94ed | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 35 | 8 | self.assertEqual | test_subgraph_graph_none | # test_dot.py
import unittest
import itertools
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'):
self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern)
def test_iter_subgraph_strict(self):
with sel... | 'graph {\n\t// comment\n\tsubgraph name {\n\t}\n}') | added | f37ec47d84343d51bb81c7c0210a17b2442cd361255ccea16b163f5ed2d7613f | self.assertEqual|test_subgraph_graph_none|# test_dot.py import unittest import itertools from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'): self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern) def test_iter_subgraph_strict(sel... | null | null | null |
xflr6/graphviz | train | 17 | 46fca02c0a98ef7f90e9664b0ea803659c3c94ed | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 72 | 8 | self.assertEqual | test_subgraph | # test_dot.py
import unittest
import itertools
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'):
self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern)
def test_iter_subgraph_strict(self):
with sel... | '''graph { subgraph { A B C A -- B [constraint=false] A -- C B -- C } subgraph { D E F D -- E [constraint=false] D -- F E -- F } edge [style=dashed] A -- D B -- E C -- F }''') | added | 7f528078498f7f7b5fcfba6c3dddea56841c906a0d4532f8d1aea96b2b8412b9 | self.assertEqual|test_subgraph|# test_dot.py import unittest import itertools from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'): self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern) def test_iter_subgraph_strict(self): with se... | null | null | null |
xflr6/graphviz | train | 17 | 46fca02c0a98ef7f90e9664b0ea803659c3c94ed | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 135 | 8 | self.assertEqual | test_label_html | # test_dot.py
import unittest
import itertools
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'):
self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern)
def test_iter_subgraph_strict(self):
with sel... | '''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>... | added | 2ef4875f35d21769a5f542d4125115717aefbb37ba088a851d3dfbdcf7c9a58d | self.assertEqual|test_label_html|# test_dot.py import unittest import itertools from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'): self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern) def test_iter_subgraph_strict(self): with ... | null | null | null |
xflr6/graphviz | train | 17 | 46fca02c0a98ef7f90e9664b0ea803659c3c94ed | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 31 | 8 | self.assertEqual | test_init | # test_files.py
import os
import unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, r'format'):
self.file.format = 'spam'
def test_engine(se... | 'name') | modified | b0e79eb228718b4f339a9a56f8b5bf98991788dc8dcfc2fbe878a4f3748da331 | self.assertEqual|test_init|# test_files.py import os import unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, r'format'): self.file.format = 'spam' def test_engine(self): with self.asser... | 'name') | 31 | 8 |
xflr6/graphviz | train | 17 | 46fca02c0a98ef7f90e9664b0ea803659c3c94ed | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 33 | 8 | self.assertEqual | test_init | # test_files.py
import os
import unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, r'format'):
self.file.format = 'spam'
def test_engine(se... | 'neato') | modified | ebbedcdd537813e2360ba8dc9e3feb0430570dd00ab2c9c53ae95307e9debecc | self.assertEqual|test_init|# test_files.py import os import unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, r'format'): self.file.format = 'spam' def test_engine(self): with self.asser... | 'neato') | 33 | 8 |
xflr6/graphviz | train | 17 | 46fca02c0a98ef7f90e9664b0ea803659c3c94ed | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 34 | 8 | self.assertEqual | test_init | # test_files.py
import os
import unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, r'format'):
self.file.format = 'spam'
def test_engine(se... | 'latin1') | modified | 998f174c9da3ddc14c9e50e526554529ae70006997997d8ac39921b442c27fbb | self.assertEqual|test_init|# test_files.py import os import unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, r'format'): self.file.format = 'spam' def test_engine(self): with self.asser... | 'latin1') | 34 | 8 |
xflr6/graphviz | train | 17 | 46fca02c0a98ef7f90e9664b0ea803659c3c94ed | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 65 | 8 | self.assertEqual | test_init | # test_files.py
import os
import unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, r'format'):
self.file.format = 'spam'
def test_engine(se... | source) | modified | af4f7958090807d5154fb2cf2b467847aaee22f64a92fe402651a2e5c2139063 | self.assertEqual|test_init|# test_files.py import os import unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, r'format'): self.file.format = 'spam' def test_engine(self): with self.asser... | source) | 65 | 8 |
xflr6/graphviz | train | 19 | 34b1cbef391e18423d5517883cba0b53ccfde8bb | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 49 | 8 | self.assertEqual | test_subgraph_reflexive | # test_dot.py
import unittest
import itertools
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'):
self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern)
def test_iter_subgraph_strict(self):
with sel... | 'graph {\n\t{\n\t}\n}') | modified | db427bb5b1f22d866137e37a4606ab41337c072e69623215fb1e66ccaf84df03 | self.assertEqual|test_subgraph_reflexive|# test_dot.py import unittest import itertools from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'): self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern) def test_iter_subgraph_strict(self... | 'graph {\n\tsubgraph {\n\t}\n}') | 49 | 8 |
xflr6/graphviz | train | 19 | 34b1cbef391e18423d5517883cba0b53ccfde8bb | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 72 | 8 | self.assertEqual | test_subgraph | # test_dot.py
import unittest
import itertools
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'):
self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern)
def test_iter_subgraph_strict(self):
with sel... | '''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 }''') | modified | 44c51c9529213ca0a9e6a30f3df04bf08fd22f44c7999f3aab3c08c211116053 | self.assertEqual|test_subgraph|# test_dot.py import unittest import itertools from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'): self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern) def test_iter_subgraph_strict(self): with se... | '''graph { subgraph { A B C A -- B [constraint=false] A -- C B -- C } subgraph { D E F D -- E [constraint=false] D -- F E -- F } edge [style=dashed] A -- D B -- E C -- F }''') | 72 | 8 |
xflr6/graphviz | train | 19 | 34b1cbef391e18423d5517883cba0b53ccfde8bb | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 135 | 8 | self.assertEqual | test_label_html | # test_dot.py
import unittest
import itertools
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'):
self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern)
def test_iter_subgraph_strict(self):
with sel... | '''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 | 55e473d3b069a42611515b5608fa4b7f2aa234449d8ff2af413df4a61ca218a9 | self.assertEqual|test_label_html|# test_dot.py import unittest import itertools from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'): self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern) def test_iter_subgraph_strict(self): with ... | '''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>... | 135 | 8 |
xflr6/graphviz | train | 20 | 2a31222c9f150e17b92adfce4a7155b3b6795678 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 21 | 8 | self.assertEqual | test_iter_strict | # test_dot.py
# flake8: noqa
import unittest
import itertools
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'):
self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern)
def test_iter_subgraph_strict(self):
... | 'strict digraph {\n}') | modified | cffebda64d57357b910d38368f631652479cde38cb3630d28accde6e4716ff06 | self.assertEqual|test_iter_strict|# test_dot.py # flake8: noqa import unittest import itertools from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'): self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern) def test_iter_subgraph_str... | 'strict digraph {\n}') | 20 | 8 |
xflr6/graphviz | train | 20 | 2a31222c9f150e17b92adfce4a7155b3b6795678 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 30 | 8 | self.assertEqual | test_attr_kw_none | # test_dot.py
# flake8: noqa
import unittest
import itertools
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'):
self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern)
def test_iter_subgraph_strict(self):
... | 'graph {\n\tspam=eggs\n}') | modified | e95bfa9803b00a5aae7184907ea0bcf5d40b4f1dd99c9b62ea4fc59e1b9c05d7 | self.assertEqual|test_attr_kw_none|# test_dot.py # flake8: noqa import unittest import itertools from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'): self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern) def test_iter_subgraph_st... | 'graph {\n\tspam=eggs\n}') | 29 | 8 |
xflr6/graphviz | train | 20 | 2a31222c9f150e17b92adfce4a7155b3b6795678 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 36 | 8 | self.assertEqual | test_subgraph_graph_none | # test_dot.py
# flake8: noqa
import unittest
import itertools
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'):
self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern)
def test_iter_subgraph_strict(self):
... | 'graph {\n\t// comment\n\tsubgraph name {\n\t}\n}') | modified | d17ecb163d72c02961329b1b2059280dca514e318723bf7bb3ed4b67ad8f27f3 | self.assertEqual|test_subgraph_graph_none|# test_dot.py # flake8: noqa import unittest import itertools from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'): self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern) def test_iter_subg... | 'graph {\n\t// comment\n\tsubgraph name {\n\t}\n}') | 35 | 8 |
xflr6/graphviz | train | 20 | 2a31222c9f150e17b92adfce4a7155b3b6795678 | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 136 | 8 | self.assertEqual | test_label_html | # test_dot.py
# flake8: noqa
import unittest
import itertools
from graphviz.dot import Graph, Digraph
class TestDot(unittest.TestCase):
def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'):
self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern)
def test_iter_subgraph_strict(self):
... | '''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 | 9566e139babda25f5a716a66f590598777dedaf8dde31149fe4e893086040d79 | self.assertEqual|test_label_html|# test_dot.py # flake8: noqa import unittest import itertools from graphviz.dot import Graph, Digraph class TestDot(unittest.TestCase): def test_repr_svg(self, pattern=r'(?s)^<\?xml .+</svg>\s*$'): self.assertRegexpMatches(Graph('spam')._repr_svg_(), pattern) def test_iter_subgraph_stri... | '''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>... | 135 | 8 |
xflr6/graphviz | train | 21 | 609631ab73f66191a7e7d618aa8c6ab74b67eb05 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 20 | 13 | self.assertRaises | test_render_filepath_missing | # test_backend.py
import unittest
import subprocess
from graphviz.backend import render, pipe
class TestRender(unittest.TestCase):
def test_render_engine_unknown(self):
with self.assertRaisesRegexp(ValueError, r'engine'):
render('spam', 'pdf', '')
def test_render_format_unknown(self):
... | subprocess.CalledProcessError) | added | baa099244de79c48714481c54e2d250f287606eb14243dbbd8b57dd59355756d | self.assertRaises|test_render_filepath_missing|# test_backend.py import unittest import subprocess from graphviz.backend import render, pipe class TestRender(unittest.TestCase): def test_render_engine_unknown(self): with self.assertRaisesRegexp(ValueError, r'engine'): render('spam', 'pdf', '') def test_render_format_un... | null | null | null |
xflr6/graphviz | train | 21 | 609631ab73f66191a7e7d618aa8c6ab74b67eb05 | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 36 | 13 | self.assertRaises | test_pipe_invalid_dot | # test_backend.py
import unittest
import subprocess
from graphviz.backend import render, pipe
class TestRender(unittest.TestCase):
def test_render_engine_unknown(self):
with self.assertRaisesRegexp(ValueError, r'engine'):
render('spam', 'pdf', '')
def test_render_format_unknown(self):
... | subprocess.CalledProcessError) | added | f1daefaf4c2a3598a8b0bdb19f557d93b90ea2861d9f401930d87685370017b3 | self.assertRaises|test_pipe_invalid_dot|# test_backend.py import unittest import subprocess from graphviz.backend import render, pipe class TestRender(unittest.TestCase): def test_render_engine_unknown(self): with self.assertRaisesRegexp(ValueError, r'engine'): render('spam', 'pdf', '') def test_render_format_unknown(s... | null | null | null |
xflr6/graphviz | train | 22 | c81039acc175f65e067b3e18c16b83ac3cb5be87 | train | tests/test_files.py | train | xflr6/graphviz:tests/test_files.py | 65 | 8 | self.assertEqual | test_init | # test_files.py
import os
import unittest
from graphviz.files import File, Source
class TestBase(unittest.TestCase):
def setUp(self):
self.file = File()
def test_format(self):
with self.assertRaisesRegexp(ValueError, r'format'):
self.file.format = 'spam'
def test_engine(se... | source) | modified | 629b5ff0c666914da32cf00a7b393a32aef5fc131dbe466412e849b51641d919 | self.assertEqual|test_init|# test_files.py import os import unittest from graphviz.files import File, Source class TestBase(unittest.TestCase): def setUp(self): self.file = File() def test_format(self): with self.assertRaisesRegexp(ValueError, r'format'): self.file.format = 'spam' def test_engine(self): with self.asser... | source) | 65 | 8 |
xflr6/graphviz | train | 23 | 191cc51739aa6834cbe069509bb3c6f28a04907c | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 12 | 9 | pytest.raises | test_render_filepath_missing | # test_backend.py
import re
import subprocess
import pytest
from graphviz.backend import render, pipe
def test_render_filepath_missing():
with pytest.raises( | subprocess.CalledProcessError) | added | 7d8a8dcc19cfa338b7ddd03f5a025dd497e48a3b641963b253ebba3b40ad459a | pytest.raises|test_render_filepath_missing|# test_backend.py import re import subprocess import pytest from graphviz.backend import render, pipe def test_render_filepath_missing(): with pytest.raises( | null | null | null |
xflr6/graphviz | train | 23 | 191cc51739aa6834cbe069509bb3c6f28a04907c | train | tests/test_backend.py | train | xflr6/graphviz:tests/test_backend.py | 18 | 9 | pytest.raises | test_render_engine_unknown | # test_backend.py
import re
import subprocess
import pytest
from graphviz.backend import render, pipe
def test_render_filepath_missing():
with pytest.raises(subprocess.CalledProcessError) as e:
render('dot', 'pdf', 'doesnotexist')
assert e.value.returncode == 2
def test_render_engine_unknown():
... | ValueError) | added | e9f6fde3d4896cb324800e57ec87c51f15afa4dcef837e837f2f05939b97921d | pytest.raises|test_render_engine_unknown|# test_backend.py import re import subprocess import pytest from graphviz.backend import render, pipe def test_render_filepath_missing(): with pytest.raises(subprocess.CalledProcessError) as e: render('dot', 'pdf', 'doesnotexist') assert e.value.returncode == 2 def test_render_e... | null | null | null |
xflr6/graphviz | train | 23 | 191cc51739aa6834cbe069509bb3c6f28a04907c | train | tests/test_dot.py | train | xflr6/graphviz:tests/test_dot.py | 47 | 9 | pytest.raises | test_subgraph_graph_notsole | # test_dot.py
# flake8: noqa
import re
import itertools
import pytest
from graphviz.dot import Graph, Digraph
def test_repr_svg(pattern=r'(?s)^<\?xml .+</svg>\s*$'):
assert re.match(pattern, Graph('spam')._repr_svg_())
def test_iter_subgraph_strict():
with pytest.raises(ValueError) as e:
Graph().... | ValueError) | added | 87f820a646f0a0f76524ad8a4770fde296ce8fb88edb5d98cc5d15fe826051dc | pytest.raises|test_subgraph_graph_notsole|# test_dot.py # flake8: noqa import re import itertools import pytest from graphviz.dot import Graph, Digraph def test_repr_svg(pattern=r'(?s)^<\?xml .+</svg>\s*$'): assert re.match(pattern, Graph('spam')._repr_svg_()) def test_iter_subgraph_strict(): with pytest.raises(ValueEr... | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.