[Zope-Checkins] SVN: zdaemon/branches/2/ Updated to reflect split of zope.testrunner and zope.testing.
jim
cvs-admin at zope.org
Wed Jun 6 21:23:42 UTC 2012
Log message for revision 126636:
Updated to reflect split of zope.testrunner and zope.testing.
Addressed deprecation warnings.
Changed:
U zdaemon/branches/2/buildout.cfg
U zdaemon/branches/2/setup.py
U zdaemon/branches/2/src/zdaemon/tests/tests.py
-=-
Modified: zdaemon/branches/2/buildout.cfg
===================================================================
--- zdaemon/branches/2/buildout.cfg 2012-06-06 21:22:27 UTC (rev 126635)
+++ zdaemon/branches/2/buildout.cfg 2012-06-06 21:23:38 UTC (rev 126636)
@@ -5,7 +5,7 @@
[test]
recipe = zc.recipe.testrunner
-eggs = zdaemon
+eggs = zdaemon [test]
[coverage-test]
recipe = zc.recipe.testrunner
Modified: zdaemon/branches/2/setup.py
===================================================================
--- zdaemon/branches/2/setup.py 2012-06-06 21:22:27 UTC (rev 126635)
+++ zdaemon/branches/2/setup.py 2012-06-06 21:23:38 UTC (rev 126636)
@@ -29,6 +29,7 @@
entry_points=entry_points,
include_package_data = True,
install_requires=["ZConfig"],
+ extras_require=dict(test=['zope.testing']),
)
except ImportError:
from distutils.core import setup
Modified: zdaemon/branches/2/src/zdaemon/tests/tests.py
===================================================================
--- zdaemon/branches/2/src/zdaemon/tests/tests.py 2012-06-06 21:22:27 UTC (rev 126635)
+++ zdaemon/branches/2/src/zdaemon/tests/tests.py 2012-06-06 21:23:38 UTC (rev 126636)
@@ -12,9 +12,17 @@
#
##############################################################################
-import os, re, shutil, sys, tempfile, unittest
-import ZConfig, zdaemon
-from zope.testing import doctest, renormalizing
+import doctest
+import os
+import re
+import shutil
+import subprocess
+import sys
+import tempfile
+import unittest
+import ZConfig
+import zdaemon
+from zope.testing import renormalizing
try:
import pkg_resources
@@ -112,13 +120,17 @@
f()
def system(command, input=''):
- i, o = os.popen4(command)
+ p = subprocess.Popen(
+ command, shell=True,
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
if input:
- i.write(input)
- i.close()
- print o.read(),
+ p.stdin.write(input)
+ p.stdin.close()
+ print p.stdout.read(),
+ p.wait()
-
def checkenv(match):
match = [a for a in match.group(1).split('\n')[:-1]
if a.split('=')[0] in ('HOME', 'LD_LIBRARY_PATH')]
More information about the Zope-Checkins
mailing list