[Checkins] SVN: Sandbox/ulif/z3c-testsetup/trunk/src/z3c/testsetup/testing.py Get rid of obsolete stuff.

Uli Fouquet uli at gnufix.de
Fri Feb 15 07:56:06 EST 2008


Log message for revision 83853:
  Get rid of obsolete stuff.

Changed:
  U   Sandbox/ulif/z3c-testsetup/trunk/src/z3c/testsetup/testing.py

-=-
Modified: Sandbox/ulif/z3c-testsetup/trunk/src/z3c/testsetup/testing.py
===================================================================
--- Sandbox/ulif/z3c-testsetup/trunk/src/z3c/testsetup/testing.py	2008-02-15 12:50:53 UTC (rev 83852)
+++ Sandbox/ulif/z3c-testsetup/trunk/src/z3c/testsetup/testing.py	2008-02-15 12:56:06 UTC (rev 83853)
@@ -15,15 +15,9 @@
 """
 import unittest
 import re
-import os.path
-from zope.testing import doctest, cleanup
-from zope.app.testing.functional import (
-    HTTPCaller, getRootFolder, sync, ZCMLLayer, FunctionalDocFileSuite,
-    FunctionalTestSetup)
 from martian.scan import module_info_from_dotted_name
 from z3c.testsetup.base import BasicTestSetup
 from z3c.testsetup.util import get_package
-from z3c.testsetup.doctesting import _collect_tests
 
 class UnitTestSetup(BasicTestSetup):
     """A unit test setup for packages.
@@ -99,31 +93,3 @@
             tests = unittest.defaultTestLoader.loadTestsFromModule(module)
             suite.addTest(tests)
         return suite
-
-def get_pytests_suite(pkg_or_dotted_name, *args, **kwargs):
-    kws = ['pfilter_func',]
-    options = kwargs.copy()
-    for optname in ['filter_func', 'extensions']:
-        if optname in kwargs.keys():
-            del (options[optname])
-    return _collect_tests(pkg_or_dotted_name, UnitTestSetup,
-                          typespec_kws=kws, *args, **options)
-
-
-def register_pytests(pkg_or_dotted_name, *args, **kwargs):
-    """Return a function that requires no argument and delivers a test
-    suite.
-
-    The resulting functions are suitable for use with unittest
-    testrunners, that look for an attribute `test_suite` on module
-    level. Such::
-
-       test_suite = register_pytests(pkg)
-
-    in a module should register all tests for the package `pkg`.
-    """
-    pkg = get_package(pkg_or_dotted_name)
-    def tmpfunc():
-        return get_pytests_suite(pkg, *args, **kwargs)
-    return tmpfunc
-    



More information about the Checkins mailing list