Skip to content

Commit 05741af

Browse files
authored
Fix some test failures in 3.6 (#2058)
* Fix more test failures * Fix more test failures * Fix skipIf condition * Skip failing test * Skip test_free_after_iterating
1 parent 853e7b3 commit 05741af

6 files changed

Lines changed: 26 additions & 11 deletions

File tree

tests/IronPython.Tests/Cases/IronPythonCasesManifest.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,6 @@ RunCondition=$(IS_POSIX) # Module resource is Posix-specific
205205
[IronPython.modules.system_related.test_sys_getframe]
206206
IsolationLevel=PROCESS # https://github.com/IronLanguages/ironpython3/issues/489
207207
FullFrames=true
208+
209+
[IronPython.modules.system_related.test_sys]
210+
RunCondition=NOT $(IS_NETCOREAPP) # https://github.com/IronLanguages/ironpython3/issues/2057

tests/suite/test_array_stdlib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import sys
1010

11-
from iptest import is_ironpython, generate_suite, run_test
11+
from iptest import is_ironpython, generate_suite, run_test, is_posix
1212

1313
import test.test_array
1414

@@ -64,6 +64,10 @@ def load_tests(loader, standard_tests, pattern):
6464
test.test_array.UnsignedShortTest('test_subclass_with_kwargs'), # https://github.com/IronLanguages/ironpython3/issues/767
6565
test.test_array.UnsignedShortTest('test_type_error'), # https://github.com/IronLanguages/ironpython3/issues/767
6666
]
67+
if is_posix:
68+
failing_tests += [
69+
test.test_array.LongTest('test_overflow'), # https://github.com/IronLanguages/ironpython3/issues/767
70+
]
6771

6872
skip_tests = []
6973

tests/suite/test_dict_stdlib.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ def load_tests(loader, standard_tests, pattern):
3131
skip_tests += [
3232
test.test_dict.DictTest('test_container_iterator'), # https://github.com/IronLanguages/ironpython3/issues/544
3333
]
34+
if sys.version_info >= (3, 6):
35+
skip_tests += [
36+
test.test_dict.DictTest('test_free_after_iterating') # AssertionError
37+
]
3438

3539
return generate_suite(tests, failing_tests, skip_tests)
3640

tests/suite/test_socket_stdlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def load_tests(loader, standard_tests, pattern):
4646
failing_tests += [
4747
test.test_socket.GeneralModuleTests('test_socket_fileno_requires_socket_fd'),
4848
]
49-
if is_linux or (is_osx and net_version < (10, 0)):
49+
if is_mono or sys.version_info < (3, 6) and (is_linux or (is_osx and net_version < (10, 0))):
5050
failing_tests += [
5151
test.test_socket.NonBlockingTCPTests('testRecv'), # TODO: figure out
5252
]

tests/suite/test_stdconsole.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import sys
88
import unittest
99

10-
from iptest import IronPythonTestCase, is_cli, is_netcoreapp21, is_posix, run_test, skipUnlessIronPython
10+
from iptest import IronPythonTestCase, is_cli, is_netcoreapp21, is_posix, run_test, skipUnlessIronPython, is_netcoreapp
1111

1212
if is_cli:
1313
import clr
@@ -404,7 +404,7 @@ def test_isatty(self):
404404
finally:
405405
self.batfile = hideDefaultBatch
406406

407-
@skipUnlessIronPython()
407+
@unittest.skipIf(not is_cli or is_netcoreapp, "https://github.com/IronLanguages/ironpython3/issues/2057")
408408
def test_cp35263(self):
409409
script = """
410410
import warnings

tests/suite/test_types_stdlib.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import sys
1010

11-
from iptest import is_ironpython, generate_suite, run_test
11+
from iptest import is_ironpython, generate_suite, run_test, is_netcoreapp
1212

1313
import test.test_types
1414

@@ -28,12 +28,16 @@ def load_tests(loader, standard_tests, pattern):
2828
]
2929
if sys.version_info >= (3, 6):
3030
failing_tests += [
31-
test.test_types.ClassCreationTests('test_bad___prepare__'), # AssertionError
32-
test.test_types.ClassCreationTests('test_one_argument_type'), # AssertionError: TypeError not raised
33-
test.test_types.CoroutineTests('test_gen'), # https://github.com/IronLanguages/ironpython3/issues/98
34-
test.test_types.CoroutineTests('test_genfunc'), # https://github.com/IronLanguages/ironpython3/issues/98
35-
test.test_types.CoroutineTests('test_returning_itercoro'), # https://github.com/IronLanguages/ironpython3/issues/98
36-
]
31+
test.test_types.ClassCreationTests('test_bad___prepare__'), # AssertionError
32+
test.test_types.ClassCreationTests('test_one_argument_type'), # AssertionError: TypeError not raised
33+
test.test_types.CoroutineTests('test_gen'), # https://github.com/IronLanguages/ironpython3/issues/98
34+
test.test_types.CoroutineTests('test_genfunc'), # https://github.com/IronLanguages/ironpython3/issues/98
35+
test.test_types.CoroutineTests('test_returning_itercoro'), # https://github.com/IronLanguages/ironpython3/issues/98
36+
]
37+
if is_netcoreapp:
38+
failing_tests += [
39+
test.test_types.CoroutineTests('test_duck_functional_gen'), # https://github.com/IronLanguages/ironpython3/issues/2054#issuecomment-4722599371 - TypeError: object of type 'str' can't be used in 'await' expression
40+
]
3741

3842
skip_tests = []
3943

0 commit comments

Comments
 (0)