/usr/lib/python3/dist-packages/pygraphviz/tests/test_drawing.py is in python3-pygraphviz 1.4~rc1-1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # -*- coding: utf-8 -*-
from nose.tools import *
import pygraphviz as pgv
@raises(AttributeError)
def test_drawing_error():
A = pgv.AGraph(name='test graph')
A.add_path([1,2,3,4])
d = A.draw()
# this is not a very good way to test...
#def test_drawing():
# A = pgv.AGraph(name='test graph')
# A.add_path([1,2,3,4])
# d = A.draw(prog='neato')
# assert_equal(len(d.splitlines()),19)
# FIXME
# smoke test
# >>> (fd,fname)=tempfile.mkstemp()
# >>> A.draw(fname,format='ps',prog='neato')
# >>> A.draw(fname,prog='neato')
@raises(ValueError)
def test_name_error():
A = pgv.AGraph(name='test graph')
A.draw('foo',prog='foo')
|