SF.net SVN: jython:[7223] trunk/jython/Lib/test/test_unittest.py

[email protected] Sun, 13 Mar 2011 03:56:16 +0000
Newsgroups gmane.comp.lang.jython.cvs
Message-ID <[email protected]>
Revision: 7223
          http://jython.svn.sourceforge.net/jython/?rev=7223&view=rev
Author:   fwierzbicki
Date:     2011-03-13 03:56:15 +0000 (Sun, 13 Mar 2011)

Log Message:
-----------
Delete tests that import audioop. I just deleted them because these tests
are not present in CPython 2.7.

Modified Paths:
--------------
    trunk/jython/Lib/test/test_unittest.py

Modified: trunk/jython/Lib/test/test_unittest.py
===================================================================
--- trunk/jython/Lib/test/test_unittest.py	2011-03-13 03:54:20 UTC (rev 7222)
+++ trunk/jython/Lib/test/test_unittest.py	2011-03-13 03:56:15 UTC (rev 7223)
@@ -507,33 +507,6 @@
         else:
             self.fail("TestLoader.loadTestsFromName failed to raise TypeError")
 
-    # "The specifier can refer to modules and packages which have not been
-    # imported; they will be imported as a side-effect"
-    def test_loadTestsFromName__module_not_loaded(self):
-        # We're going to try to load this module as a side-effect, so it
-        # better not be loaded before we try.
-        #
-        # Why pick audioop? Google shows it isn't used very often, so there's
-        # a good chance that it won't be imported when this test is run
-        module_name = 'audioop'
-
-        import sys
-        if module_name in sys.modules:
-            del sys.modules[module_name]
-
-        loader = unittest.TestLoader()
-        try:
-            suite = loader.loadTestsFromName(module_name)
-
-            self.failUnless(isinstance(suite, loader.suiteClass))
-            self.assertEqual(list(suite), [])
-
-            # audioop should now be loaded, thanks to loadTestsFromName()
-            self.failUnless(module_name in sys.modules)
-        finally:
-            if module_name in sys.modules:
-                del sys.modules[module_name]
-
     ################################################################
     ### Tests for TestLoader.loadTestsFromName()
 
@@ -895,33 +868,6 @@
         else:
             self.fail("TestLoader.loadTestsFromNames failed to raise TypeError")
 
-    # "The specifier can refer to modules and packages which have not been
-    # imported; they will be imported as a side-effect"
-    def test_loadTestsFromNames__module_not_loaded(self):
-        # We're going to try to load this module as a side-effect, so it
-        # better not be loaded before we try.
-        #
-        # Why pick audioop? Google shows it isn't used very often, so there's
-        # a good chance that it won't be imported when this test is run
-        module_name = 'audioop'
-
-        import sys
-        if module_name in sys.modules:
-            del sys.modules[module_name]
-
-        loader = unittest.TestLoader()
-        try:
-            suite = loader.loadTestsFromNames([module_name])
-
-            self.failUnless(isinstance(suite, loader.suiteClass))
-            self.assertEqual(list(suite), [unittest.TestSuite()])
-
-            # audioop should now be loaded, thanks to loadTestsFromName()
-            self.failUnless(module_name in sys.modules)
-        finally:
-            if module_name in sys.modules:
-                del sys.modules[module_name]
-
     ################################################################
     ### /Tests for TestLoader.loadTestsFromNames()
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d