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
5 changes: 2 additions & 3 deletions tests/IronPython.Tests/Cases/CPythonCasesManifest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,8 @@ Ignore=true
[CPython.test_lib2to3]
Ignore=true

# TODO: 3.6
#[CPython.test_linecache]
#Ignore=true # blocked by https://github.com/IronLanguages/ironpython3/issues/1245 - using the test_linecache_stdlib approach makes the issue disappear...
[CPython.test_linecache] # IronPython.test_linecache_stdlib
Ignore=true

[CPython.test_list]
IsolationLevel=ENGINE
Expand Down
9 changes: 6 additions & 3 deletions tests/suite/test_datetime_stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,10 @@ 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 @@ -91,7 +89,6 @@ def load_tests(loader, standard_tests, pattern):
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.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 All @@ -112,6 +109,12 @@ def load_tests(loader, standard_tests, pattern):
test.datetimetester.TestTimeDelta('test_overflow'), # rounding differences
]
if sys.version_info >= (3, 6):
skip_tests += [
# these can fail with a ValueError if the current time zone is not UTC
test.datetimetester.TestDateTime('test_timestamp_limits'), # ValueError: The added or subtracted value results in an un-representable DateTime.
test.datetimetester.TestDateTimeTZ('test_timestamp_limits'), # ValueError: The added or subtracted value results in an un-representable DateTime.
test.datetimetester.TestSubclassDateTime('test_timestamp_limits'), # ValueError: The added or subtracted value results in an un-representable DateTime.
]
for test_or_suite in tests:
if isinstance(test_or_suite, test.datetimetester.ZoneInfoCompleteTest):
for t in test_or_suite:
Expand Down
31 changes: 31 additions & 0 deletions tests/suite/test_linecache_stdlib.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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_linecache from StdLib
##

import sys

from iptest import is_ironpython, generate_suite, run_test

import test.test_linecache

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

if is_ironpython:
# There are no failing tests when running via test_linecache_stdlib, but when running test_linecache directly there are some failures.
# See https://github.com/IronLanguages/ironpython3/issues/1245 for details.

failing_tests = []

skip_tests = []

return generate_suite(tests, failing_tests, skip_tests)

else:
return tests

run_test(__name__)
6 changes: 5 additions & 1 deletion tests/suite/test_typing_stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import sys

from iptest import is_ironpython, generate_suite, run_test
from iptest import is_ironpython, generate_suite, run_test, is_netcoreapp

import test.test_typing

Expand Down Expand Up @@ -49,6 +49,10 @@ def load_tests(loader, standard_tests, pattern):
test.test_typing.NamedTupleTests('test_annotation_usage_with_default'), # TypeError: __new__() takes exactly 1 argument (2 given)
test.test_typing.NamedTupleTests('test_annotation_usage_with_methods'), # TypeError: __new__() takes exactly 1 argument (2 given)
]
if is_netcoreapp:
failing_tests += [
test.test_typing.CollectionsAbcTests('test_awaitable'), # https://github.com/IronLanguages/ironpython3/issues/2054
]

skip_tests = []
if sys.version_info >= (3, 6):
Expand Down