[Checkins] SVN: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/ Not gonna cover that piece of junk.
Tres Seaver
cvs-admin at zope.org
Wed May 9 23:46:58 UTC 2012
Log message for revision 125801:
Not gonna cover that piece of junk.
It should be ripped out instead,
Changed:
U zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/stxdocs.py
D zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_stxdocs.py
-=-
Modified: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/stxdocs.py
===================================================================
--- zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/stxdocs.py 2012-05-09 23:46:50 UTC (rev 125800)
+++ zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/stxdocs.py 2012-05-09 23:46:55 UTC (rev 125801)
@@ -27,20 +27,21 @@
documentation is stored. Note that this tool will create
sub-directories with files in them.
"""
+# XXX This should be ripped out of the package.
import sys, os, getopt
import zope.configuration
from zope.schema import getFieldsInOrder
from zope.configuration import config, xmlconfig
from zope.configuration.docutils import wrap, makeDocStructures
-def usage(code, msg=''):
+def usage(code, msg=''): #pragma NO COVER
# Python 2.1 required
print >> sys.stderr, __doc__
if msg:
print >> sys.stderr, msg
sys.exit(code)
-def _directiveDocs(name, schema, handler, info, indent_offset=0):
+def _directiveDocs(name, schema, handler, info, indent_offset=0): #pragma NO COVER
"""Generate the documentation for one directive."""
# Write out the name of the directive
@@ -86,7 +87,7 @@
return text
-def _subDirectiveDocs(subdirs, namespace, name):
+def _subDirectiveDocs(subdirs, namespace, name): #pragma NO COVER
"""Appends a list of sub-directives and their full specification."""
if subdirs.has_key((namespace, name)):
text = '\n Subdirectives\n\n'
@@ -100,7 +101,7 @@
return text + '\n\n'.join(sub_dirs)
return ''
-def makedocs(target_dir, zcml_file):
+def makedocs(target_dir, zcml_file): #pragma NO COVER
"""Generate the documentation tree.
All we need for this is a starting ZCML file and a directory in which to
@@ -122,7 +123,7 @@
text += _subDirectiveDocs(subdirs, namespace, name)
open(dir_file, 'w').write(text)
-def _makeabs(path):
+def _makeabs(path): #pragma NO COVER
"""Make an absolute path from the possibly relative path."""
if not path == os.path.abspath(path):
cwd = os.getcwd()
@@ -132,7 +133,7 @@
path = os.path.normpath(os.path.join(cwd, path))
return path
-def main(argv=sys.argv):
+def main(argv=sys.argv): #pragma NO COVER
try:
opts, args = getopt.getopt(
sys.argv[1:],
@@ -159,5 +160,5 @@
# Generate the docs
makedocs(output_dir, zcml_file)
-if __name__ == '__main__':
+if __name__ == '__main__': #pragma NO COVER
main()
Deleted: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_stxdocs.py
===================================================================
--- zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_stxdocs.py 2012-05-09 23:46:50 UTC (rev 125800)
+++ zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_stxdocs.py 2012-05-09 23:46:55 UTC (rev 125801)
@@ -1,31 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 20!2 Zope Foundation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Test zope.configuration.stxdocs
-"""
-import unittest
-
-
-class Test_makedocs(unittest.TestCase):
-
- def _callFUT(self, *args, **kw):
- from zope.configuration.stxdocs import makedocs
- return makedocs(*args, **kw)
-
-
-
-def test_suite():
- return unittest.TestSuite((
- unittest.makeSuite(Test_makedocs),
- ))
-
More information about the checkins
mailing list