Пример #1
0
def test_svg(tmpdir):
    tmpdir.chdir()
    ab = tmpdir.join('ab.svg')
    dot(u"""
    digraph G {
        a -> b
    }
    """, o=ab.basename)
    assert ab.exists()
Пример #2
0
def test_svg(tmpdir):
    tmpdir.chdir()
    ab = tmpdir.join('ab.svg')
    dot(u"""
    digraph G {
        a -> b
    }
    """, o=ab.basename)
    assert ab.exists()
Пример #3
0
def test_boolopt(tmpdir):
    tmpdir.chdir()
    ab = tmpdir.join('ab.svg')
    dot("""
    digraph G {
        a -> b
    }
    """, x=True, o=ab.basename)
    print(tmpdir.listdir())
    assert ab.exists()
Пример #4
0
def test_boolopt(tmpdir):
    tmpdir.chdir()
    ab = tmpdir.join('ab.svg')
    dot("""
    digraph G {
        a -> b
    }
    """,
        x=True,
        o=ab.basename)
    print(tmpdir.listdir())
    assert ab.exists()
Пример #5
0
def test_obj(tmpdir):
    class MyClass(object):
        def __unicode__(self):
            return u"""
                digraph G {
                    a -> b
                }
                """

    tmpdir.chdir()
    ab = tmpdir.join('ab.svg')
    dot(MyClass(), x=True, o=ab.basename)
    print tmpdir.listdir()
    assert ab.exists()
Пример #6
0
def test_obj(tmpdir):  # pragma: nocover
    GRAPH = u"""
    digraph G {
        a -> b
    }
    """
    import sys
    if sys.version_info >= (3,):
        class MyClass:
            def __str__(self):
                return GRAPH
    else:
        class MyClass(object):
            def __unicode__(self):
                return GRAPH

    tmpdir.chdir()
    ab = tmpdir.join('ab.svg')
    dot(MyClass(), x=True, o=ab.basename)
    print(tmpdir.listdir())
    assert ab.exists()
Пример #7
0
def test_obj(tmpdir):  # pragma: nocover
    GRAPH = u"""
    digraph G {
        a -> b
    }
    """
    import sys
    if sys.version_info >= (3, ):

        class MyClass:
            def __str__(self):
                return GRAPH
    else:

        class MyClass(object):
            def __unicode__(self):
                return GRAPH

    tmpdir.chdir()
    ab = tmpdir.join('ab.svg')
    dot(MyClass(), x=True, o=ab.basename)
    print(tmpdir.listdir())
    assert ab.exists()