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
11 changes: 4 additions & 7 deletions tests/IronPython.Tests/Cases/CPythonCasesManifest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,8 @@ Reason=Only valid for Unix
[CPython.test_gzip]
IsolationLevel=PROCESS # https://github.com/IronLanguages/ironpython3/issues/1440

# TODO: 3.6
#[CPython.test_heapq]
#Ignore=true
[CPython.test_heapq] # IronPython.test_heapq_stdlib
Ignore=true

[CPython.test_httplib] # IronPython.test_httplib_stdlib
Ignore=true
Expand Down Expand Up @@ -833,10 +832,8 @@ RunCondition=$(IS_POSIX)
Ignore=true
Reason=unittest.case.SkipTest: No module named 'readline'

# TODO: 3.6
[CPython.test_regrtest]
IsolationLevel=PROCESS
#Ignore=true # lots of failures
[CPython.test_regrtest] # IronPython.test_regrtest_stdlib
Ignore=true

[CPython.test_reprlib]
Ignore=true
Expand Down
3 changes: 3 additions & 0 deletions tests/IronPython.Tests/Cases/IronPythonCasesManifest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ RetryCount=2
IsolationLevel=PROCESS
Arguments=-X:CompilationThreshold 0 "$(TEST_FILE)" # ensure CompilationThreshold is 0 otherwise tests are meaningless!

[IronPython.test_regrtest_stdlib]
IsolationLevel=PROCESS

[IronPython.test_set_stdlib]
RunCondition=NOT $(IS_MONO) # weakref failures; https://github.com/IronLanguages/ironpython3/issues/544
IsolationLevel=PROCESS # Also weakref failures; https://github.com/IronLanguages/ironpython3/issues/489
Expand Down
37 changes: 9 additions & 28 deletions tests/suite/test_datetime_stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def load_tests(loader, standard_tests, pattern):
failing_tests = [
test.datetimetester.TestDate('test_backdoor_resistance'),
test.datetimetester.TestDate('test_insane_fromtimestamp'),
test.datetimetester.TestDateTime('test_backdoor_resistance'),
test.datetimetester.TestDateTime('test_extreme_timedelta'),
test.datetimetester.TestDateTime('test_insane_fromtimestamp'),
test.datetimetester.TestDateTime('test_insane_utcfromtimestamp'),
Expand All @@ -46,6 +45,10 @@ def load_tests(loader, standard_tests, pattern):
test.datetimetester.TestTimeTZ('test_zones'),
test.datetimetester.TestTimeZone('test_constructor'),
]
if sys.version_info < (3, 6):
failing_tests += [
test.datetimetester.TestDateTime('test_backdoor_resistance'),
]
if sys.version_info >= (3, 6):
failing_tests += [
test.datetimetester.IranTest('test_folds'), # https://github.com/IronLanguages/ironpython3/issues/1459
Expand All @@ -60,10 +63,12 @@ def load_tests(loader, standard_tests, pattern):
test.datetimetester.TestDateTime('test_compat_unpickle'), # TypeError: function takes at least 3 arguments (1 given)
test.datetimetester.TestDateTime('test_isoformat'), # TypeError: isoformat() got an unexpected keyword argument 'timespec'
test.datetimetester.TestDateTime('test_subclass_replace'), # TypeError: replace() got an unexpected keyword argument 'year'
test.datetimetester.TestDateTime('test_timestamp_limits'), # ValueError: The added or subtracted value results in an un-representable DateTime.
test.datetimetester.TestDateTimeTZ('test_bad_constructor_arguments'), # https://github.com/IronLanguages/ironpython3/issues/1459
test.datetimetester.TestDateTimeTZ('test_compat_unpickle'), # TypeError: function takes at least 3 arguments (2 given)
test.datetimetester.TestDateTimeTZ('test_isoformat'), # TypeError: isoformat() got an unexpected keyword argument 'timespec'
test.datetimetester.TestDateTimeTZ('test_subclass_replace'), # TypeError: replace() got an unexpected keyword argument 'year'
test.datetimetester.TestDateTimeTZ('test_timestamp_limits'), # ValueError: The added or subtracted value results in an un-representable DateTime.
test.datetimetester.TestLocalTimeDisambiguation('test_comparison'), # https://github.com/IronLanguages/ironpython3/issues/1459
test.datetimetester.TestLocalTimeDisambiguation('test_constructors'), # https://github.com/IronLanguages/ironpython3/issues/1459
test.datetimetester.TestLocalTimeDisambiguation('test_dst'), # https://github.com/IronLanguages/ironpython3/issues/1459
Expand All @@ -82,35 +87,11 @@ def load_tests(loader, standard_tests, pattern):
test.datetimetester.TestLocalTimeDisambiguation('test_vilnius_1941_toutc'), # AssertionError: '06/23/41 19:59:59 ' != 'Mon Jun 23 19:59:59 1941 UTC'
test.datetimetester.TestModule('test_divide_and_round'), # AttributeError: 'module' object has no attribute '_divide_and_round'
test.datetimetester.TestSubclassDateTime('test_bad_constructor_arguments'), # https://github.com/IronLanguages/ironpython3/issues/1459
test.datetimetester.TestSubclassDateTime('test_combine'), # TypeError: combine() takes exactly 2 arguments (3 given)
test.datetimetester.TestSubclassDateTime('test_compat_unpickle'), # TypeError: function takes at least 3 arguments (1 given)
test.datetimetester.TestSubclassDateTime('test_isoformat'), # TypeError: isoformat() got an unexpected keyword argument 'timespec'
test.datetimetester.TestSubclassDateTime('test_subclass_replace'), # TypeError: replace() got an unexpected keyword argument 'year'
test.datetimetester.TestTime('test_backdoor_resistance'), # AssertionError: "^bad tzinfo state arg$" does not match "expected Int32, got bytes"
test.datetimetester.TestTime('test_compat_unpickle'), # TypeError: expected Int32, got str
test.datetimetester.TestTime('test_isoformat'), # TypeError: isoformat() takes no arguments (1 given)
test.datetimetester.TestTime('test_subclass_replace'), # AssertionError: <class '_datetime.time'> is not <class 'test.datetimetester.TimeSubclass'>
test.datetimetester.TestTimeDelta('test_issue31293'), # ZeroDivisionError: Attempted to divide by zero.
test.datetimetester.TestTimeTZ('test_backdoor_resistance'), # AssertionError: "^bad tzinfo state arg$" does not match "expected Int32, got bytes"
test.datetimetester.TestTimeTZ('test_compat_unpickle'), # TypeError: expected Int32, got str
test.datetimetester.TestTimeTZ('test_isoformat'), # TypeError: isoformat() takes no arguments (1 given)
test.datetimetester.TestTimeTZ('test_subclass_replace'), # AssertionError: <class '_datetime.time'> is not <class 'test.datetimetester.TimeSubclass'>
test.datetimetester.ZoneInfoTest('test_folds'), # https://github.com/IronLanguages/ironpython3/issues/1459
test.datetimetester.ZoneInfoTest('test_gaps'), # https://github.com/IronLanguages/ironpython3/issues/1459
test.datetimetester.ZoneInfoTest('test_system_transitions'), # AttributeError: 'module' object has no attribute 'tzset'
test.datetimetester.TestSubclassDateTime('test_subclass_replace'), # TypeError: replace() got an unexpected keyword argument 'year'
test.datetimetester.TestTime('test_backdoor_resistance'), # AssertionError: "^bad tzinfo state arg$" does not match "expected Int32, got bytes"
test.datetimetester.TestTime('test_compat_unpickle'), # TypeError: expected Int32, got str
test.datetimetester.TestTime('test_isoformat'), # TypeError: isoformat() takes no arguments (1 given)
test.datetimetester.TestTime('test_subclass_replace'), # AssertionError: <class '_datetime.time'> is not <class 'test.datetimetester.TimeSubclass'>
test.datetimetester.TestTimeDelta('test_computations'), # rounding differences
test.datetimetester.TestTimeDelta('test_issue31293'), # ZeroDivisionError: Attempted to divide by zero.
test.datetimetester.TestTimeTZ('test_backdoor_resistance'), # AssertionError: "^bad tzinfo state arg$" does not match "expected Int32, got bytes"
test.datetimetester.TestTimeTZ('test_compat_unpickle'), # TypeError: expected Int32, got str
test.datetimetester.TestTimeTZ('test_isoformat'), # TypeError: isoformat() takes no arguments (1 given)
test.datetimetester.TestTimeTZ('test_subclass_replace'), # AssertionError: <class '_datetime.time'> is not <class 'test.datetimetester.TimeSubclass'>
test.datetimetester.ZoneInfoTest('test_folds'), # https://github.com/IronLanguages/ironpython3/issues/1459
test.datetimetester.ZoneInfoTest('test_gaps'), # https://github.com/IronLanguages/ironpython3/issues/1459
test.datetimetester.ZoneInfoTest('test_system_transitions'), # AttributeError: 'module' object has no attribute 'tzset'
test.datetimetester.TestSubclassDateTime('test_subclass_replace'), # TypeError: replace() got an unexpected keyword argument 'year'
test.datetimetester.TestSubclassDateTime('test_timestamp_limits'), # ValueError: The added or subtracted value results in an un-representable DateTime.
test.datetimetester.TestTime('test_backdoor_resistance'), # AssertionError: "^bad tzinfo state arg$" does not match "expected Int32, got bytes"
test.datetimetester.TestTime('test_compat_unpickle'), # TypeError: expected Int32, got str
test.datetimetester.TestTime('test_isoformat'), # TypeError: isoformat() takes no arguments (1 given)
Expand Down
35 changes: 35 additions & 0 deletions tests/suite/test_heapq_stdlib.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information.

##
## Run selected tests from test_heapq from StdLib
##

import sys

from iptest import is_ironpython, generate_suite, run_test

import test.test_heapq

def load_tests(loader, standard_tests, pattern):
tests = loader.loadTestsFromModule(test.test_heapq, pattern=pattern)

if is_ironpython:
failing_tests = []
if sys.version_info >= (3, 6):
failing_tests += [
test.test_heapq.TestErrorHandlingC('test_comparison_operator_modifiying_heap'), # TypeError: '<' not supported between instances of 'EvilClass' and 'int'
test.test_heapq.TestErrorHandlingC('test_comparison_operator_modifiying_heap_two_heaps'), # AssertionError: (<class 'IndexError'>, <class 'RuntimeError'>) not raised by heappush
test.test_heapq.TestErrorHandlingPython('test_comparison_operator_modifiying_heap'), # TypeError: '<' not supported between instances of 'EvilClass' and 'int'
test.test_heapq.TestModules('test_c_functions'), # AssertionError: 'heapq' != '_heapq'
]

skip_tests = []

return generate_suite(tests, failing_tests, skip_tests)

else:
return tests

run_test(__name__)
2 changes: 1 addition & 1 deletion tests/suite/test_io_stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ def load_tests(loader, standard_tests, pattern):
test.test_io.CMiscIOTest('test_readinto_buffer_overflow'), # IndexError: Index was outside the bounds of the array.
test.test_io.CMiscIOTest('test_warn_on_dealloc'), # AssertionError: ResourceWarning not triggered
test.test_io.CMiscIOTest('test_warn_on_dealloc_fd'), # AssertionError: ResourceWarning not triggered
test.test_io.PyMiscIOTest('test_io_after_close'), # AttributeError: 'FileIO' object has no attribute 'read1'
test.test_io.PyMiscIOTest('test_nonblock_pipe_write_bigbuf'), # AttributeError: 'module' object has no attribute 'fcntl'
test.test_io.PyMiscIOTest('test_nonblock_pipe_write_smallbuf'), # AttributeError: 'module' object has no attribute 'fcntl'
test.test_io.PyMiscIOTest('test_warn_on_dealloc'), # AssertionError: ResourceWarning not triggered
Expand All @@ -102,6 +101,7 @@ def load_tests(loader, standard_tests, pattern):
test.test_io.CBufferedWriterTest('test_garbage_collection'), # AssertionError: filter ('', ResourceWarning) did not catch any warning
test.test_io.CBufferedRandomTest('test_garbage_collection'), # AssertionError: filter ('', ResourceWarning) did not catch any warning
test.test_io.CTextIOWrapperTest('test_garbage_collection'), # AssertionError: filter ('', ResourceWarning) did not catch any warning
test.test_io.PyMiscIOTest('test_io_after_close'), # AttributeError: 'FileIO' object has no attribute 'read1'
test.test_io.PyMiscIOTest('test_pickling'), # AssertionError: TypeError not raised by _dumps
]
if sys.version_info >= (3, 6):
Expand Down
62 changes: 62 additions & 0 deletions tests/suite/test_regrtest_stdlib.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information.

##
## Run selected tests from test_regrtest from StdLib
##

import sys

from iptest import is_ironpython, generate_suite, run_test

import test.test_regrtest

def load_tests(loader, standard_tests, pattern):
tests = loader.loadTestsFromModule(test.test_regrtest, pattern=pattern)

if is_ironpython:
failing_tests = []

skip_tests = []
if sys.version_info >= (3, 6):
skip_tests += [
# TODO: these all fail (and are slow)
test.test_regrtest.ArgsTestCase('test_coverage'),
test.test_regrtest.ArgsTestCase('test_crashed'),
test.test_regrtest.ArgsTestCase('test_env_changed'),
test.test_regrtest.ArgsTestCase('test_failing_test'),
test.test_regrtest.ArgsTestCase('test_forever'),
test.test_regrtest.ArgsTestCase('test_fromfile'),
test.test_regrtest.ArgsTestCase('test_huntrleaks'),
test.test_regrtest.ArgsTestCase('test_huntrleaks_fd_leak'),
test.test_regrtest.ArgsTestCase('test_interrupted'),
test.test_regrtest.ArgsTestCase('test_list_cases'),
test.test_regrtest.ArgsTestCase('test_list_tests'),
test.test_regrtest.ArgsTestCase('test_matchfile'),
test.test_regrtest.ArgsTestCase('test_no_test_ran_some_test_exist_some_not'),
test.test_regrtest.ArgsTestCase('test_no_tests_ran'),
test.test_regrtest.ArgsTestCase('test_no_tests_ran_multiple_tests_nonexistent'),
test.test_regrtest.ArgsTestCase('test_random'),
test.test_regrtest.ArgsTestCase('test_rerun_fail'),
test.test_regrtest.ArgsTestCase('test_resources'),
test.test_regrtest.ArgsTestCase('test_slow_interrupted'),
test.test_regrtest.ArgsTestCase('test_slowest'),
test.test_regrtest.ArgsTestCase('test_wait'),
test.test_regrtest.ProgramsTestCase('test_module_autotest'),
test.test_regrtest.ProgramsTestCase('test_module_from_test_autotest'),
test.test_regrtest.ProgramsTestCase('test_module_regrtest'),
test.test_regrtest.ProgramsTestCase('test_module_test'),
test.test_regrtest.ProgramsTestCase('test_pcbuild_rt'),
test.test_regrtest.ProgramsTestCase('test_script_autotest'),
test.test_regrtest.ProgramsTestCase('test_script_regrtest'),
test.test_regrtest.ProgramsTestCase('test_tools_buildbot_test'),
test.test_regrtest.ProgramsTestCase('test_tools_script_run_tests'),
]

return generate_suite(tests, failing_tests, skip_tests)

else:
return tests

run_test(__name__)
13 changes: 12 additions & 1 deletion tests/suite/test_sax_stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def load_tests(loader, standard_tests, pattern):
test.test_sax.ErrorReportingTest('test_expat_incomplete'), # AttributeError: 'xmlparser' object has no attribute 'ErrorColumnNumber'
test.test_sax.ErrorReportingTest('test_expat_inpsource_location'), # AttributeError: 'xmlparser' object has no attribute 'ErrorColumnNumber'
test.test_sax.ExpatReaderTest('test_expat_dtdhandler'), # AssertionError
test.test_sax.ExpatReaderTest('test_expat_entityresolver'), # AssertionError
test.test_sax.ExpatReaderTest('test_expat_text_file'), # AssertionError
test.test_sax.ParseTest('test_parseString_bytes'), # UnicodeEncodeError
test.test_sax.ParseTest('test_parse_InputSource'), # AttributeError: 'xmlparser' object has no attribute 'ErrorColumnNumber'
Expand Down Expand Up @@ -53,6 +52,18 @@ def load_tests(loader, standard_tests, pattern):
test.test_sax.WriterXmlgenTest('test_xmlgen_pi'), # TypeError: expected long, got NoneType
test.test_sax.WriterXmlgenTest('test_xmlgen_unencodable'), # TypeError: expected long, got NoneType
]
if sys.version_info < (3, 6):
failing_tests += [
test.test_sax.ExpatReaderTest('test_expat_entityresolver'), # AssertionError
]
if sys.version_info >= (3, 6):
failing_tests += [
test.test_sax.ExpatReaderTest('test_expat_entityresolver_enabled'), # AssertionError
test.test_sax.ExpatReaderTest('test_expat_external_dtd_enabled'), # AssertionError
test.test_sax.ExpatReaderTest('test_expat_inpsource_character_stream'), # AssertionError
test.test_sax.ParseTest('test_parseString_text'), # UnicodeEncodeError
test.test_sax.ParseTest('test_parse_close_source'), # AttributeError: 'xmlparser' object has no attribute 'ErrorColumnNumber'
]

skip_tests = []

Expand Down
5 changes: 4 additions & 1 deletion tests/suite/test_sqlite3_stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ def load_tests(loader, standard_tests, pattern):
sqlite3.test.transactions.TransactionTests('CheckDMLDoesNotAutoCommitBefore'),
sqlite3.test.transactions.TransactionalDDL('CheckImmediateTransactionalDDL'),
sqlite3.test.transactions.TransactionalDDL('CheckTransactionalDDL'),
sqlite3.test.userfunctions.AggregateTests('CheckAggrCheckParamsInt'),
]
if is_linux:
failing_tests += [
Expand Down Expand Up @@ -148,6 +147,10 @@ def load_tests(loader, standard_tests, pattern):
sqlite3.test.userfunctions.AuthorizerLargeIntegerTests('test_column_access'),
sqlite3.test.userfunctions.AuthorizerLargeIntegerTests('test_table_access'),
]
if sys.version_info >= (3, 6):
skip_tests += [
sqlite3.test.userfunctions.AggregateTests('CheckAggrCheckParamsInt'),
]

return generate_suite(tests, failing_tests, skip_tests)

Expand Down
2 changes: 1 addition & 1 deletion tests/suite/test_ssl_stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def load_tests(loader, standard_tests, pattern):
if is_ironpython:
failing_tests = [
test.test_ssl.BasicSocketTests('test_enum_crls'), # AssertionError: [] is not true
test.test_ssl.BasicSocketTests('test_errors'), # AssertionError: OSError not raised
test.test_ssl.BasicSocketTests('test_get_default_verify_paths'), # AttributeError: 'module' object has no attribute 'get_default_verify_paths'
test.test_ssl.BasicSocketTests('test_parse_cert'), # KeyError: OCSP
test.test_ssl.BasicSocketTests('test_parse_cert_CVE_2013_4238'), # AssertionError: Tuples differ
Expand Down Expand Up @@ -47,6 +46,7 @@ def load_tests(loader, standard_tests, pattern):
]
if sys.version_info < (3, 6):
failing_tests += [
test.test_ssl.BasicSocketTests('test_errors'), # AssertionError: OSError not raised
test.test_ssl.NetworkedTests('test_ciphers'), # AssertionError: SSLError not raised
test.test_ssl.NetworkedTests('test_connect'), # AssertionError: {} != None
test.test_ssl.NetworkedTests('test_connect_capath'), # ssl.SSLError: [Errno 'errors while validating certificate chain: '] RemoteCertificateChainErrors
Expand Down
2 changes: 1 addition & 1 deletion tests/suite/test_yield_from_stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from iptest import is_ironpython, generate_suite, run_test

if sys.version_info >= (3, 6):
import test.yield_from as test_yield_from
import test.test_yield_from as test_yield_from
else:
import test.test_pep380 as test_yield_from

Expand Down