[Jython-checkins] jython: Skipping tests that where previously skipped.
frank.wierzbicki
jython-checkins at python.org
Thu Dec 27 21:07:15 CET 2012
http://hg.python.org/jython/rev/8bc3fb357491
changeset: 6920:8bc3fb357491
user: Frank Wierzbicki <fwierzbicki at gmail.com>
date: Thu Dec 27 12:07:08 2012 -0800
summary:
Skipping tests that where previously skipped.
files:
Lib/test/test_sort.py | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/Lib/test/test_sort.py b/Lib/test/test_sort.py
--- a/Lib/test/test_sort.py
+++ b/Lib/test/test_sort.py
@@ -39,6 +39,8 @@
return
class TestBase(unittest.TestCase):
+ @unittest.skipIf(test_support.is_jython,
+ "FIXME: find the part that is too much for Jython.")
def testStressfully(self):
# Try a variety of sizes at and around powers of 2, and at powers of 10.
sizes = [0]
@@ -209,7 +211,12 @@
dup = data[:]
self.assertRaises(ZeroDivisionError, data.sort, None, lambda x: 1 // x)
self.assertEqual(data, dup)
-
+
+ # for jython, we have a different storage mechanism for this in our
+ # implementation of MergeState; given that this is likely to go away,
+ # this doesn't seem so important
+ @unittest.skipIf(test_support.is_jython,
+ "Jython has a different implementation of MergeSort")
def test_key_with_mutation(self):
data = range(10)
def k(x):
@@ -217,7 +224,11 @@
data[:] = range(20)
return x
self.assertRaises(ValueError, data.sort, key=k)
-
+
+ # The function passed to the "key" argument changes the data upon which
+ # sort is invoked. It can not be checked if that function changes data as
+ # long as it is invoked(e.g. __del__ in SortKiller). so skipping for now.
+ @unittest.skipIf(test_support.is_jython, "Doesn't work for Jython")
def test_key_with_mutating_del(self):
data = range(10)
class SortKiller(object):
@@ -228,6 +239,10 @@
data[:] = range(20)
self.assertRaises(ValueError, data.sort, key=SortKiller)
+ # The function passed to the "key" argument changes the data upon which
+ # sort is invoked. It can not be checked if that function changes data as
+ # long as it is invoked(e.g. __del__ in SortKiller). so skipping for now.
+ @unittest.skipIf(test_support.is_jython, "Doesn't work for Jython")
def test_key_with_mutating_del_and_exception(self):
data = range(10)
## dup = data[:]
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list