public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [gentoo-commits] gentoo-x86 commit in dev-python/pygraphviz/files: pygraphviz-1.0-avoid_tests.patch
@ 2010-10-29 21:40 99% Arfrever Frehtes Taifersar Arahesis (arfrever)
  0 siblings, 0 replies; 1+ results
From: Arfrever Frehtes Taifersar Arahesis (arfrever) @ 2010-10-29 21:40 UTC (permalink / raw
  To: gentoo-commits

arfrever    10/10/29 21:40:13

  Added:                pygraphviz-1.0-avoid_tests.patch
  Log:
  Don't require tests at run time (bug #341505).
  
  (Portage version: 2.2.0_alpha2_p1/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  dev-python/pygraphviz/files/pygraphviz-1.0-avoid_tests.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pygraphviz/files/pygraphviz-1.0-avoid_tests.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pygraphviz/files/pygraphviz-1.0-avoid_tests.patch?rev=1.1&content-type=text/plain

Index: pygraphviz-1.0-avoid_tests.patch
===================================================================
--- pygraphviz/agraph.py
+++ pygraphviz/agraph.py
@@ -1623,28 +1623,3 @@
     except (TypeError, ValueError):
         return False
     return True
-
-
-def _test_suite():
-    import doctest
-    suite = doctest.DocFileSuite('tests/graph.txt',
-                                 'tests/attributes.txt',
-                                 'tests/layout_draw.txt',
-                                 'tests/subgraph.txt',
-                                 package='pygraphviz')
-    doctest.testmod() # test docstrings in module
-    return suite
-
-
-if __name__ == "__main__":
-    import os
-    import sys
-    import unittest
-    if sys.version_info[:2] < (2, 4):
-        print "Python version 2.4 or later required for tests (%d.%d detected)." %  sys.version_info[:2]
-        sys.exit(-1)
-    # directory of package (relative to this)
-    nxbase=sys.path[0]+os.sep+os.pardir
-    sys.path.insert(0,nxbase) # prepend to search path
-    unittest.TextTestRunner().run(_test_suite())
-    
--- pygraphviz/__init__.py
+++ pygraphviz/__init__.py
@@ -67,6 +67,3 @@
     print "pygraphviz-"+__version__
     neato=_get_prog('neato')
     os.system(neato+' -V')
-
-# import tests: run as pygraphviz.test()
-from tests import run as test






^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2010-10-29 21:40 99% [gentoo-commits] gentoo-x86 commit in dev-python/pygraphviz/files: pygraphviz-1.0-avoid_tests.patch Arfrever Frehtes Taifersar Arahesis (arfrever)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox