[Jython-checkins] jython: Add a skip for isolated failure in test_classpathimporter (#2422)

jeff.allen jython-checkins at python.org
Tue Nov 10 14:07:25 EST 2015


https://hg.python.org/jython/rev/fa60627c599f
changeset:   7795:fa60627c599f
parent:      7791:159a0fc6d562
user:        Jeff Allen <ja.py at farowl.co.uk>
date:        Fri Nov 06 20:41:38 2015 +0000
summary:
  Add a skip for isolated failure in test_classpathimporter (#2422)

Also updates expected failures in regrtest and corrects a typo.

files:
  Lib/test/regrtest.py               |  17 ++++++++---------
  Lib/test/test_classpathimporter.py |   1 +
  Lib/test/test_support.py           |   1 +
  3 files changed, 10 insertions(+), 9 deletions(-)


diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -1367,20 +1367,19 @@
 
     'java.posix':   # Expected to fail on Linux
         """
-        test_classpathimporter  # Fails in test_loader_get_code
         test_codecencodings_tw  # Fails in test_multibytecodec_support.py
         test_jython_launcher    # /usr/bin/env: python2.7 -E: No such file or directory
 
         # These leak file handles on a grand scale (observed on Ubuntu 14.04),
         # causing failures elsewhere, but they don't actually fail.
-        test_docxmlrpc          #  206 leaked handles issue 2320
-        test_httpservers        #  721 leaked handles issue 2320
-        ## test_imaplib            #   92 leaked handles issue 2320 (tolerable)
-        test_socketserver       # 1344 leaked handles issue 2320
-        test_telnetlib          # 1588 leaked handles issue 2320
-        ## test_timeout            #  123 leaked handles issue 2320 (tolerable)
-        test_urllib2_localnet   #  763 leaked handles issue 2320
-        test_xmlrpc             #  453 leaked handles issue 2320
+        test_docxmlrpc          #  206 leaked handles issue 2420
+        test_httpservers        #  721 leaked handles issue 2420
+        ## test_imaplib            #   92 leaked handles issue 2420 (tolerable)
+        test_socketserver       # 1344 leaked handles issue 2420
+        test_telnetlib          # 1588 leaked handles issue 2420
+        ## test_timeout            #  123 leaked handles issue 2420 (tolerable)
+        test_urllib2_localnet   #  763 leaked handles issue 2420
+        test_xmlrpc             #  453 leaked handles issue 2420
 
         """
 }
diff --git a/Lib/test/test_classpathimporter.py b/Lib/test/test_classpathimporter.py
--- a/Lib/test/test_classpathimporter.py
+++ b/Lib/test/test_classpathimporter.py
@@ -118,6 +118,7 @@
         self.assertTrue(loader.is_package('jar_pkg'))
         self.assertFalse(loader.is_package('jar_pkg.prefer_compiled'))
 
+    @unittest.skipIf(test_support.is_jython_posix, "FIXME: failing on Linux issue #2422")
     def test_loader_get_code(self):
         # Execute Python code out of the JAR
         jar = self.prepareJar('classimport.jar')
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -52,6 +52,7 @@
 # We use these extensively in adapting the regression tests for Jython
 is_jython = sys.platform.startswith('java')
 is_jython_nt = is_jython and (os._name == 'nt')
+is_jython_posix = is_jython and (os._name == 'posix')
 
 class Error(Exception):
     """Base class for regression test exceptions."""

-- 
Repository URL: https://hg.python.org/jython


More information about the Jython-checkins mailing list