Skip to content

Commit

Permalink
Fix some test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
slozier committed Apr 6, 2024
1 parent 32b57a3 commit a9ed3b7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Src/IronPython/Lib/iptest/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
is_netcoreapp31 = False
is_net60 = False
is_net70 = False
is_net80 = False
is_mono = False
is_netstandard = False
if is_ironpython:
Expand All @@ -30,6 +31,7 @@
is_netcoreapp31 = clr.FrameworkDescription.startswith(".NET Core 3.1")
is_net60 = clr.FrameworkDescription.startswith(".NET 6.0")
is_net70 = clr.FrameworkDescription.startswith(".NET 7.0")
is_net80 = clr.FrameworkDescription.startswith(".NET 8.0")
is_mono = clr.IsMono
is_netstandard = clr.TargetFramework.startswith(".NETStandard")

Expand Down
4 changes: 2 additions & 2 deletions Tests/test_cliclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import sys
import unittest
from iptest import IronPythonTestCase, is_cli, is_debug, is_mono, is_net70, is_netcoreapp, is_netcoreapp21, is_posix, big, run_test, skipUnlessIronPython
from iptest import IronPythonTestCase, is_cli, is_debug, is_mono, is_net70, is_net80, is_netcoreapp, is_netcoreapp21, is_posix, big, run_test, skipUnlessIronPython

if is_cli:
import clr
Expand Down Expand Up @@ -1421,7 +1421,7 @@ def test_clr_dir(self):
self.assertTrue('IndexOf' not in clr.Dir('abc'))
self.assertTrue('IndexOf' in clr.DirClr('abc'))

@unittest.skipIf(is_net70, "TODO") # TODO: https://github.com/IronLanguages/ironpython3/issues/1485
@unittest.skipIf(is_net70 or is_net80, "TODO") # TODO: https://github.com/IronLanguages/ironpython3/issues/1485
def test_int32_bigint_equivalence(self):
import math

Expand Down
4 changes: 2 additions & 2 deletions Tests/test_int.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import sys

from iptest import IronPythonTestCase, is_cli, is_net70, is_netstandard, is_mono, big, myint, skipUnlessIronPython, run_test
from iptest import IronPythonTestCase, is_cli, is_net70, is_net80, is_netstandard, is_mono, big, myint, skipUnlessIronPython, run_test

class IntNoClrTest(IronPythonTestCase):
"""Must be run before IntTest because it depends on CLR API not being visible."""
Expand All @@ -27,7 +27,7 @@ def test_instance_set(self):
self.assertSetEqual(set(dir(j)) - set(dir(i)), {'GetByteCount', 'TryWriteBytes'})
self.assertSetEqual(set(dir(int)) - set(dir(Int32)), {'GetByteCount', 'TryWriteBytes'})

if is_net70: # https://github.com/IronLanguages/ironpython3/issues/1485
if is_net70 or is_net80: # https://github.com/IronLanguages/ironpython3/issues/1485
diff = {'TryConvertToChecked', 'MinValue', 'TryConvertFromChecked', 'MaxValue', 'TryConvertFromTruncating', 'WriteBigEndian', 'GetShortestBitLength', 'TryWriteLittleEndian', 'WriteLittleEndian', 'TryConvertToSaturating', 'TryConvertFromSaturating', 'TryWriteBigEndian', 'TryConvertToTruncating'}
self.assertSetEqual(set(dir(i)) - set(dir(j)), diff)
self.assertSetEqual(set(dir(Int32)) - set(dir(int)), diff)
Expand Down
4 changes: 2 additions & 2 deletions Tests/test_methodbinder1.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import unittest

from iptest import IronPythonTestCase, is_mono, is_net70, is_netcoreapp, run_test, skipUnlessIronPython
from iptest import IronPythonTestCase, is_mono, is_net70, is_net80, is_netcoreapp, run_test, skipUnlessIronPython
from iptest.type_util import *

from System import Int32
Expand Down Expand Up @@ -176,7 +176,7 @@ def test_this_matrix(self):



ch2bi = True if is_net70 else TypeE # .NET 7 adds an implicit cast from Char to BigInteger
ch2bi = True if is_net70 or is_net80 else TypeE # .NET 7 adds an implicit cast from Char to BigInteger
################################################## pass in char #########################################################
#### M201 M680 M202 M203 M681 M204 M205 M301 M302 M303 M304 M310 M311 M312 M313 M320 M321 M400
#### int int? double bigint bigint? bool str sbyte i16 i64 single byte ui16 ui32 ui64 char decm obj
Expand Down

0 comments on commit a9ed3b7

Please sign in to comment.