File: test_layout.py

package info (click to toggle)
python-pygraphviz 1.3.1-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 664 kB
  • sloc: ansic: 4,970; python: 2,523; makefile: 152
file content (9 lines) | stat: -rw-r--r-- 254 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
# -*- coding: utf-8 -*-
from nose.tools import *
import pygraphviz as pgv

def test_layout():
    A = pgv.AGraph(name='test graph')
    A.add_path([1,2,3,4])
    A.layout()
    assert_equal(['pos' in n.attr for n in A.nodes()], [True, True, True, True])