Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Src/IronPythonTest/Cases/IronPythonCasesManifest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ Reason=Causes an abort on mono, needs debug
Ignore=true
Reason=disabled in IronLanguages/main, needs lots of work

[IronPythonCases.test_file]
RunCondition='$(OS)' != 'Unix'
Reason=Currently getting a mutex error see https://github.com/IronLanguages/main/issues/1618

[IronPythonCases.test_fuzz_parser]
Ignore=true
Reason=Takes way too long (ran overnight without completing!)
Expand Down
2 changes: 0 additions & 2 deletions Src/StdLib/Lib/test/test_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,8 +963,6 @@ def test_testfile(self):

@unittest.skipUnless(float.__getformat__("double").startswith("IEEE"),
"test requires IEEE 754 doubles")
@unittest.skipUnless(not (sys.platform == "cli" and os.name == "posix"),
"test has OverflowError on IronPython on Mono https://github.com/IronLanguages/main/issues/1603")
def test_mtestfile(self):
ALLOWED_ERROR = 20 # permitted error, in ulps
fail_fmt = "{}:{}({!r}): expected {!r}, got {!r}"
Expand Down
5 changes: 3 additions & 2 deletions Tests/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

CP16623_LOCK = thread.allocate_lock()

from iptest import IronPythonTestCase, is_cli, is_netcoreapp21, is_cpython, is_posix, run_test
from iptest import IronPythonTestCase, is_cli, is_mono, is_netcoreapp21, is_cpython, is_posix, run_test

class FileTest(IronPythonTestCase):

Expand Down Expand Up @@ -410,7 +410,7 @@ def test_newlines_attribute(self):


## coverage: a sequence of file operation
@unittest.skipIf(is_posix, 'file sequence specific to windows')
@unittest.skipIf(is_posix, 'file sequence specific to windows (because of newlines)')
def test_coverage(self):
with file(self.temp_file, 'w') as f:
self.assertTrue(str(f).startswith("<open file '%s', mode 'w'" % self.temp_file))
Expand Down Expand Up @@ -505,6 +505,7 @@ def test_net_stream(self):
self.assertEqual(f.read(), 'hello\nworld\ngoodbye\n')

@unittest.skipUnless(is_cli, 'IronPython specific test')
@unittest.skipIf(is_mono, 'Mono has a different GC setup, so we can not rely on the Collect to work the same')
def test_file_manager(self):
def return_fd1():
f = file(self.temp_file, 'w')
Expand Down
8 changes: 3 additions & 5 deletions Tests/test_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ def test_z_cli_tests(self): # runs last to prevent tainting the module w/ CLR
x = self.run_help(System.String.Format)
self.assertTrue(x.find('Format(format: str, arg0: object) -> str') != -1)

# https://github.com/mono/mono/issues/7095
if not is_mono:
x = self.run_help('u.u'.Split('u'))
# requires std lib
self.assertTrue('Help on Array[str] object' in x, x)
x = self.run_help('u.u'.Split('u'))
# requires std lib
self.assertTrue('Help on Array[str] object' in x, x)

# https://github.com/IronLanguages/ironpython2/issues/359
if not is_mono:
Expand Down
6 changes: 2 additions & 4 deletions Tests/test_inheritance.py
Original file line number Diff line number Diff line change
Expand Up @@ -1138,10 +1138,8 @@ def __init__(self, value):
DReturnTypes.M_IEnumerable = lambda self: { 1 : "one", 10: "two", 100: "three"}
self.assertEqual(reduce(add, used.Use_IEnumerable()), 111)

# https://github.com/mono/mono/issues/7095
if not is_mono:
DReturnTypes.M_IEnumerator = lambda self: iter(System.Array[int](range(10)))
self.assertEqual(list(used.Use_IEnumerator()), range(10))
DReturnTypes.M_IEnumerator = lambda self: iter(System.Array[int](range(10)))
self.assertEqual(list(used.Use_IEnumerator()), range(10))

DReturnTypes.M_IEnumerable = lambda self: System.Array[int](range(10))
self.assertEqual(reduce(add, used.Use_IEnumerable()), 45)
Expand Down
4 changes: 1 addition & 3 deletions Tests/test_methodbinder1.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,7 @@ def test_collections(self):
self._helper(self.target.M652, [arrayInt, arrayObj, arrayByte, listInt, tupleInt, tupleLong1, tupleLong2, ], 652, [], TypeError)

# IEnumerator[int]
# https://github.com/mono/mono/issues/7093
if not is_mono:
self._helper(self.target.M653, [], 653, [arrayInt, arrayObj, arrayByte, listInt, tupleInt, tupleLong1, tupleLong2, ], TypeError)
self._helper(self.target.M653, [], 653, [arrayInt, arrayObj, arrayByte, listInt, tupleInt, tupleLong1, tupleLong2, ], TypeError)

# Int32[]
self._helper(self.target.M500, [arrayInt, tupleInt, tupleLong1, tupleBool, ], 500, [listInt, arrayByte, arrayObj, ], TypeError)
Expand Down
6 changes: 1 addition & 5 deletions Tests/test_str.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import sys
import unittest

from iptest import IronPythonTestCase, is_cli, is_mono, run_test, skipUnlessIronPython
from iptest import IronPythonTestCase, is_cli, run_test, skipUnlessIronPython

class StrTest(IronPythonTestCase):

Expand Down Expand Up @@ -197,8 +197,6 @@ def test_encoding_backslashreplace(self):
('iso-8859-15', u"a\xac\u1234\u20ac\u8000", "a\xac\\u1234\xa4\\u8000") ]

for test in tests:
# undo this when mono bug https://bugzilla.xamarin.com/show_bug.cgi?id=53296 is fixed
if is_mono and test[0] in ['latin-1', 'iso-8859-15']: continue
self.assertEqual(test[1].encode(test[0], 'backslashreplace'), test[2])


Expand All @@ -208,8 +206,6 @@ def test_encoding_xmlcharrefreplace(self):
('latin-1', u"a\xac\u1234\u20ac\u8000", "a\xac&#4660;&#8364;&#32768;"),
('iso-8859-15', u"a\xac\u1234\u20ac\u8000", "a\xac&#4660;\xa4&#32768;") ]
for test in tests:
# undo this when mono bug https://bugzilla.xamarin.com/show_bug.cgi?id=53296 is fixed
if is_mono and test[0] in ['latin-1', 'iso-8859-15']: continue
self.assertEqual(test[1].encode(test[0], 'xmlcharrefreplace'), test[2])

def test_encode_decode(self):
Expand Down
4 changes: 1 addition & 3 deletions Tests/test_strformat.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import sys
import unittest

from iptest import IronPythonTestCase, is_cli, is_cpython, is_mono, run_test, skipUnlessIronPython
from iptest import IronPythonTestCase, is_cli, is_cpython, run_test, skipUnlessIronPython

allChars = ''
for y in [chr(x) for x in xrange(256) if chr(x) != '[' and chr(x) != '.']:
Expand Down Expand Up @@ -876,7 +876,6 @@ def test_int___format___errors(self):
for error, value, errorFmt, errorMsg in errors:
self.assertRaisesPartialMessage(error, errorMsg, value.__format__, errorFmt)

@unittest.skipIf(is_mono, "mono doesn't support some of the formatting specifiers https://github.com/IronLanguages/main/issues/1598")
def test_long___format__(self):
tests = [
(0L, '+', '+0'),
Expand Down Expand Up @@ -1152,7 +1151,6 @@ def test_long___format__(self):
self.assertEqual(100000L.__format__('n'), '100000')
self.assertEqual(100000000L.__format__('n'), '100000000')

@unittest.skipIf(is_mono, "mono doesn't support some of the formatting specifiers https://github.com/IronLanguages/main/issues/1598")
def test_long___format___errors(self):
errors = [
(ValueError, 2L, '6.1', "Precision not allowed in integer format specifier"),
Expand Down
1 change: 0 additions & 1 deletion Tests/test_threadsafety.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
class ThreadSafetyTest(unittest.TestCase):

#TODO: @skip("multiple_execute")
@unittest.skipIf(is_mono, 'this causes an exception on mono, need to file a bug see https://github.com/IronLanguages/main/issues/1619')
def test_all(self):
from System.Threading import ManualResetEvent, Thread, ThreadStart
class MyOC:
Expand Down
2 changes: 1 addition & 1 deletion Tests/test_unicode.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_raw_unicode_escape_trailing_backslash(self):
self.assertEqual(unicode('\\', 'raw_unicode_escape'), u'\\')


@unittest.skipIf(is_mono, 'throws an exception within Mono, needs debug see https://github.com/IronLanguages/main/issues/1617')
@unittest.skipIf(is_mono, 'throws an exception within Mono, needs debug see https://github.com/IronLanguages/ironpython2/issues/49')
def test_unicode_error(self):
from iptest.misc_util import ip_supported_encodings
from _codecs import register_error
Expand Down