changeset 2448:c9949c55ff5e

add coverage_modules attribute for coverage testing
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 20 Jul 2007 22:26:57 +0200
parents 45641cbe7729
children fa3aca6aacd4 3d08f1cb4429
files MoinMoin/_tests/test_Page.py MoinMoin/_tests/test_PageEditor.py MoinMoin/_tests/test_error.py MoinMoin/_tests/test_packages.py MoinMoin/_tests/test_user.py MoinMoin/_tests/test_wikidicts.py MoinMoin/_tests/test_wikisync.py MoinMoin/_tests/test_wikiutil.py MoinMoin/config/_tests/test_multiconfig.py MoinMoin/converter/_tests/test_text_html_text_moin_wiki.py MoinMoin/formatter/_tests/test_formatter.py MoinMoin/macro/_tests/test_Action.py MoinMoin/macro/_tests/test_Hits.py MoinMoin/macro/_tests/test_ImageLink.py MoinMoin/macro/_tests/test_macro.py MoinMoin/mail/_tests/test_sendmail.py MoinMoin/parser/_tests/test_text_moin_wiki.py MoinMoin/request/_tests/test_request.py MoinMoin/search/_tests/test_search.py MoinMoin/security/_tests/test_security.py MoinMoin/util/_tests/test_diff3.py MoinMoin/util/_tests/test_diff_text.py MoinMoin/util/_tests/test_lock.py MoinMoin/util/_tests/test_pysupport.py MoinMoin/util/_tests/test_util.py MoinMoin/util/_tests/test_web.py MoinMoin/widget/_tests/test_html.py MoinMoin/wikixml/_tests/test_marshal.py MoinMoin/xmlrpc/_tests/test_multicall.py
diffstat 29 files changed, 76 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_Page.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/_tests/test_Page.py	Fri Jul 20 22:26:57 2007 +0200
@@ -61,3 +61,5 @@
         assert u'' not in pagelist
 
 
+coverage_modules = ['MoinMoin.Page']
+
--- a/MoinMoin/_tests/test_PageEditor.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/_tests/test_PageEditor.py	Fri Jul 20 22:26:57 2007 +0200
@@ -197,3 +197,7 @@
     print "PageEditor can't save a page if Abort is returned from PreSave event handlers"
     page = Page(request, pagename)
     assert page.body != testtext
+
+
+coverage_modules = ['MoinMoin.PageEditor']
+
--- a/MoinMoin/_tests/test_error.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/_tests/test_error.py	Fri Jul 20 22:26:57 2007 +0200
@@ -43,3 +43,5 @@
         err = error.Error(test)
         self.assertEqual('%(message)s' % err, test)
 
+coverage_modules = ['MoinMoin.error']
+
--- a/MoinMoin/_tests/test_packages.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/_tests/test_packages.py	Fri Jul 20 22:26:57 2007 +0200
@@ -78,3 +78,5 @@
         for line in ([':foo', 'is\\', 'ja|', u't|', u'baAz'], [], ['', '']):
             assert line == unpackLine(packLine(line))
 
+coverage_modules = ['MoinMoin.packages']
+
--- a/MoinMoin/_tests/test_user.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/_tests/test_user.py	Fri Jul 20 22:26:57 2007 +0200
@@ -263,3 +263,6 @@
             self.assertEqual(result, expected,
                              'Expected "%(expected)s" but got "%(result)s"' % locals())
 
+
+coverage_modules = ['MoinMoin.user']
+
--- a/MoinMoin/_tests/test_wikidicts.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/_tests/test_wikidicts.py	Fri Jul 20 22:26:57 2007 +0200
@@ -114,4 +114,5 @@
         assert 'RecentChanges' in members
         assert 'HelpContents' in members
 
+coverage_modules = ['MoinMoin.wikidicts']
 
--- a/MoinMoin/_tests/test_wikisync.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/_tests/test_wikisync.py	Fri Jul 20 22:26:57 2007 +0200
@@ -37,3 +37,5 @@
         tags = TagStore(self.page)
         tags.clear()
 
+coverage_modules = ['MoinMoin.wikisync']
+
--- a/MoinMoin/_tests/test_wikiutil.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/_tests/test_wikiutil.py	Fri Jul 20 22:26:57 2007 +0200
@@ -196,3 +196,5 @@
         self.assert_(result == expected,
                      'Expected "%(expected)s" but got "%(result)s"' % locals())
 
+coverage_modules = ['MoinMoin.wikiutil']
+
--- a/MoinMoin/config/_tests/test_multiconfig.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/config/_tests/test_multiconfig.py	Fri Jul 20 22:26:57 2007 +0200
@@ -63,4 +63,5 @@
                     print "%r: %s" % (pw, pw_error)
                     assert result == (pw_error is None)
 
+coverage_modules = ['MoinMoin.config.multiconfig']
 
--- a/MoinMoin/converter/_tests/test_text_html_text_moin_wiki.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/converter/_tests/test_text_html_text_moin_wiki.py	Fri Jul 20 22:26:57 2007 +0200
@@ -1134,3 +1134,6 @@
 """
         self.do(test, output)
 
+
+coverage_modules = ['MoinMoin.converter.text_html_text_moin_wiki']
+
--- a/MoinMoin/formatter/_tests/test_formatter.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/formatter/_tests/test_formatter.py	Fri Jul 20 22:26:57 2007 +0200
@@ -76,3 +76,15 @@
 
         return self.request.redirectedOutput(page.send_page, content_only=1)
 
+
+coverage_modules = ['MoinMoin.formatter',
+                    'MoinMoin.formatter.text_html',
+                    'MoinMoin.formatter.text_gedit',
+                    'MoinMoin.formatter.text_xml',
+                    #'MoinMoin.formatter.text_docbook',
+                    'MoinMoin.formatter.text_plain',
+                    #'MoinMoin.formatter.dom_xml',
+                    'MoinMoin.formatter.text_python',
+                    'MoinMoin.formatter.pagelinks',
+                   ]
+
--- a/MoinMoin/macro/_tests/test_Action.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/macro/_tests/test_Action.py	Fri Jul 20 22:26:57 2007 +0200
@@ -61,3 +61,6 @@
 
         assert result == expected
 
+
+coverage_modules = ['MoinMoin.macro.Action']
+
--- a/MoinMoin/macro/_tests/test_Hits.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/macro/_tests/test_Hits.py	Fri Jul 20 22:26:57 2007 +0200
@@ -105,3 +105,5 @@
         assert result == expected
 
 
+coverage_modules = ['MoinMoin.macro.Hits']
+
--- a/MoinMoin/macro/_tests/test_ImageLink.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/macro/_tests/test_ImageLink.py	Fri Jul 20 22:26:57 2007 +0200
@@ -80,4 +80,5 @@
         assert result == expected
 
 
+coverage_modules = ['MoinMoin.macro.ImageLink']
 
--- a/MoinMoin/macro/_tests/test_macro.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/macro/_tests/test_macro.py	Fri Jul 20 22:26:57 2007 +0200
@@ -32,3 +32,6 @@
         m = macro.Macro(p)
         return m
 
+
+coverage_modules = ['MoinMoin.macro']
+
--- a/MoinMoin/mail/_tests/test_sendmail.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/mail/_tests/test_sendmail.py	Fri Jul 20 22:26:57 2007 +0200
@@ -113,3 +113,6 @@
         self.failUnlessEqual(sendmail.encodeAddress(address, self.charset),
                              expected)
 
+
+coverage_modules = ['MoinMoin.mail.sendmail']
+
--- a/MoinMoin/parser/_tests/test_text_moin_wiki.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/parser/_tests/test_text_moin_wiki.py	Fri Jul 20 22:26:57 2007 +0200
@@ -609,3 +609,7 @@
             html = self.parse(self.text % test)
             result = self.needle.search(html).group(1)
             assert result == expected
+
+
+coverage_modules = ['MoinMoin.parser.text_moin_wiki']
+
--- a/MoinMoin/request/_tests/test_request.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/request/_tests/test_request.py	Fri Jul 20 22:26:57 2007 +0200
@@ -120,3 +120,5 @@
                              'wrong date string')
 
 
+coverage_modules = ['MoinMoin.request']
+
--- a/MoinMoin/search/_tests/test_search.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/search/_tests/test_search.py	Fri Jul 20 22:26:57 2007 +0200
@@ -34,3 +34,6 @@
         for case in tests:
             self.assertEqual(self.parser.isQuoted(case), False)
 
+
+coverage_modules = ['MoinMoin.search']
+
--- a/MoinMoin/security/_tests/test_security.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/security/_tests/test_security.py	Fri Jul 20 22:26:57 2007 +0200
@@ -275,3 +275,5 @@
                 import shutil
                 shutil.rmtree(path, True)
 
+coverage_modules = ['MoinMoin.security']
+
--- a/MoinMoin/util/_tests/test_diff3.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/util/_tests/test_diff3.py	Fri Jul 20 22:26:57 2007 +0200
@@ -82,3 +82,5 @@
         assert result == expected, ('Expected "%(expected)s" but got "%(result)s"') % locals()
 
 
+coverage_modules = ['MoinMoin.util.diff3']
+
--- a/MoinMoin/util/_tests/test_diff_text.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/util/_tests/test_diff_text.py	Fri Jul 20 22:26:57 2007 +0200
@@ -66,3 +66,5 @@
         assert result == expected, ('Expected "%(expected)s" but got "%(result)s"') % locals()
 
 
+coverage_modules = ['MoinMoin.util.diff_text']
+
--- a/MoinMoin/util/_tests/test_lock.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/util/_tests/test_lock.py	Fri Jul 20 22:26:57 2007 +0200
@@ -128,3 +128,5 @@
         time.sleep(delay)
         lock.release()
 
+coverage_modules = ['MoinMoin.util.lock']
+
--- a/MoinMoin/util/_tests/test_pysupport.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/util/_tests/test_pysupport.py	Fri Jul 20 22:26:57 2007 +0200
@@ -124,3 +124,4 @@
                 if err.errno != errno.ENOENT:
                     raise
 
+coverage_modules = ['MoinMoin.util.pysupport']
--- a/MoinMoin/util/_tests/test_util.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/util/_tests/test_util.py	Fri Jul 20 22:26:57 2007 +0200
@@ -51,3 +51,4 @@
         expected = length
         assert result == expected, ('Expected length "%(expected)s" but got "%(result)s"') % locals()
 
+coverage_modules = ['MoinMoin.util']
--- a/MoinMoin/util/_tests/test_web.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/util/_tests/test_web.py	Fri Jul 20 22:26:57 2007 +0200
@@ -93,3 +93,6 @@
         self.assertEqual(result, expected,
                          'Expected "%(expected)s" but got "%(result)s"' % locals())
 
+
+coverage_modules = ['MoinMoin.util.web']
+
--- a/MoinMoin/widget/_tests/test_html.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/widget/_tests/test_html.py	Fri Jul 20 22:26:57 2007 +0200
@@ -64,3 +64,5 @@
             self.assertEqual(result, expected,
                              'Expected "%(expected)s" but got "%(result)s"' % locals())
 
+coverage_modules = ['MoinMoin.widget.html']
+
--- a/MoinMoin/wikixml/_tests/test_marshal.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/wikixml/_tests/test_marshal.py	Fri Jul 20 22:26:57 2007 +0200
@@ -54,3 +54,6 @@
         self.assertEqual(objXML, expected,
             'Expected "%(expected)s" but got "%(objXML)s"' % locals())
 
+
+coverage_modules = ['MoinMoin.wikixml.marshal']
+
--- a/MoinMoin/xmlrpc/_tests/test_multicall.py	Fri Jul 20 20:33:01 2007 +0200
+++ b/MoinMoin/xmlrpc/_tests/test_multicall.py	Fri Jul 20 22:26:57 2007 +0200
@@ -25,3 +25,6 @@
     assert type(result[0]) == dict
     assert result[0].has_key("faultCode") and result[0].has_key("faultString")
 
+
+coverage_modules = ['MoinMoin.xmlrpc']
+