Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/pygraphviz/files: pygraphviz-1.2-avoid_tests.patch
Date: Sun, 29 Dec 2013 00:55:32
Message-Id: 20131229005528.A6A922004E@flycatcher.gentoo.org
1 jlec 13/12/29 00:55:28
2
3 Added: pygraphviz-1.2-avoid_tests.patch
4 Log:
5 dev-python/pygraphviz: Version Bump
6
7 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
8
9 Revision Changes Path
10 1.1 dev-python/pygraphviz/files/pygraphviz-1.2-avoid_tests.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pygraphviz/files/pygraphviz-1.2-avoid_tests.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pygraphviz/files/pygraphviz-1.2-avoid_tests.patch?rev=1.1&content-type=text/plain
14
15 Index: pygraphviz-1.2-avoid_tests.patch
16 ===================================================================
17 pygraphviz/__init__.py | 2 --
18 pygraphviz/agraph.py | 25 -------------------------
19 2 files changed, 27 deletions(-)
20
21 diff --git a/pygraphviz/__init__.py b/pygraphviz/__init__.py
22 index a807801..33f727e 100644
23 --- a/pygraphviz/__init__.py
24 +++ b/pygraphviz/__init__.py
25 @@ -68,5 +68,3 @@ def version():
26 neato=_get_prog('neato')
27 os.system(neato+' -V')
28
29 -# import tests: run as pygraphviz.test()
30 -from tests import run as test
31 diff --git a/pygraphviz/agraph.py b/pygraphviz/agraph.py
32 index c9f735b..90a661e 100644
33 --- a/pygraphviz/agraph.py
34 +++ b/pygraphviz/agraph.py
35 @@ -1771,28 +1771,3 @@ class ItemAttribute(Attribute):
36 value.decode(self.encoding))
37 except KeyError: # gv.agxget returned KeyError, skip
38 continue
39 -
40 -
41 -
42 -def _test_suite():
43 - import doctest
44 - suite = doctest.DocFileSuite('tests/graph.txt',
45 - 'tests/attributes.txt',
46 - 'tests/layout_draw.txt',
47 - 'tests/subgraph.txt',
48 - package='pygraphviz')
49 - doctest.testmod() # test docstrings in module
50 - return suite
51 -
52 -
53 -if __name__ == "__main__":
54 - import os
55 - import sys
56 - import unittest
57 - if sys.version_info[:2] < (2, 4):
58 - print "Python version 2.4 or later required for tests (%d.%d detected)." % sys.version_info[:2]
59 - sys.exit(-1)
60 - # directory of package (relative to this)
61 - nxbase=sys.path[0]+os.sep+os.pardir
62 - sys.path.insert(0,nxbase) # prepend to search path
63 - unittest.TextTestRunner().run(_test_suite())