~ubuntu-branches/ubuntu/utopic/python-networkx/utopic

« back to all changes in this revision

Viewing changes to networkx/drawing/tests/test_pydot.py

  • Committer: Package Import Robot
  • Author(s): Sandro Tosi
  • Date: 2012-08-11 12:41:30 UTC
  • mfrom: (1.4.1) (5.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20120811124130-whr6uso7fncyg8bi
Tags: 1.7-1
* New upstream release
* debian/patches/changeset_*
  - removed, included upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
    Unit tests for pydot drawing functions.
3
3
"""
4
4
 
5
 
import os, sys
 
5
import os
6
6
import tempfile
7
7
 
8
8
from nose import SkipTest
40
40
        assert_true( P.write_raw(fname) )
41
41
 
42
42
        Pin = pydot.graph_from_dot_file(fname)   
 
43
 
43
44
        n1 = sorted([p.get_name() for p in P.get_node_list()])
44
45
        n2 = sorted([p.get_name() for p in Pin.get_node_list()])
45
46
        assert_true( n1 == n2 )
51
52
        Hin = nx.drawing.nx_pydot.read_dot(fname)
52
53
        Hin = H.__class__(Hin)
53
54
        self.assert_equal(H, Hin)
54
 
        os.unlink(fname)
 
55
#        os.unlink(fname)
 
56
 
55
57
 
56
58
    def testUndirected(self):
57
59
        self.pydot_checks(nx.Graph())