Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
062a0bc
Reflect PR #1 Support for Decimal
C-SELLERS Feb 3, 2021
5ed5a96
Reflect PR#8 MISSING CONVERTER.CS L516-528 Changes
C-SELLERS Feb 3, 2021
9b5445e
Reflect PR #14
C-SELLERS Feb 4, 2021
709643a
Reflect PR #15
C-SELLERS Feb 4, 2021
a481700
Reflect PR #19
C-SELLERS Feb 4, 2021
de0328c
Reflect PR #25
C-SELLERS Feb 4, 2021
481f4d0
Reflect PR #34
C-SELLERS Feb 4, 2021
863530d
Reflect PR #35
C-SELLERS Feb 4, 2021
5839d21
Implement List Conversion, Reflect PR #37 Tests
C-SELLERS Feb 4, 2021
c362816
Reflect PR #38 Partial: Assembly Manager Improvements
C-SELLERS Feb 4, 2021
cde9b51
Reflect PR #38
C-SELLERS Feb 4, 2021
101624e
Reflect PR #42 KeyValuePairEnumerableObject
C-SELLERS Feb 4, 2021
56a4bcf
Reflect PR #10 Runtime DecimalType
C-SELLERS Feb 4, 2021
508db2e
Add TimeDelta and DateTime tests
C-SELLERS Feb 5, 2021
ebbafad
Fix DecimalConversion test for float conversion
C-SELLERS Feb 5, 2021
53375ce
Converter mod tweaks
C-SELLERS Feb 6, 2021
c8fdbcb
Adjust a few broken PyTests
C-SELLERS Feb 6, 2021
af30873
Use _pydecimal to not interfere with Lean/decimal.py
C-SELLERS Feb 9, 2021
bf1755d
Add MethodBinder tests
C-SELLERS Feb 9, 2021
58d5df0
MethodBinder implicit resolution
Martin-Molinero Feb 4, 2021
0c94228
Fix bad cherry pick
C-SELLERS Feb 10, 2021
44e089a
Refactoring precedence resolution
Martin-Molinero Feb 5, 2021
108eacf
Deal with operator binding
C-SELLERS Feb 10, 2021
6379568
Fix `TestNoOverloadException` unit test
C-SELLERS Feb 10, 2021
9f2796a
Fix for DomainReload tests
C-SELLERS Feb 10, 2021
b0aca5c
Add InEquality Operator Test
C-SELLERS Feb 11, 2021
0f5f0ba
Dont PyObjects precedence in Operator methods
C-SELLERS Feb 11, 2021
ed6ab18
Revert "Merge pull request #1240 from danabr/auto-cast-ret-val-to-int…
C-SELLERS Feb 12, 2021
d87584b
Fix Primitive Conversion to Int
C-SELLERS Feb 15, 2021
f59335f
Post rebase fix
C-SELLERS Feb 15, 2021
bd94e49
Add PrimitiveIntConversion test
C-SELLERS Feb 16, 2021
cd06d10
Add test for interface derived classes
C-SELLERS Feb 16, 2021
aeb20c0
Add to Authors.md
C-SELLERS Feb 16, 2021
ae34f30
Load in current directory into Python Path
C-SELLERS Feb 18, 2021
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
Prev Previous commit
Next Next commit
Adjust a few broken PyTests
  • Loading branch information
C-SELLERS committed Feb 15, 2021
commit c8fdbcb0307cda7a9711feb58c00f0ad7bb00533
27 changes: 8 additions & 19 deletions src/tests/test_dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ def test_dict_contains():
"""Test dict support for __contains__."""

ob = Test.PublicDictionaryTest()
items = ob.items
keys = ob.items.Keys

assert '0' in items
assert '1' in items
assert '2' in items
assert '3' in items
assert '4' in items
assert '0' in keys
assert '1' in keys
assert '2' in keys
assert '3' in keys
assert '4' in keys

assert not ('5' in items)
assert not ('-1' in items)
assert not ('5' in keys)
assert not ('-1' in keys)

def test_dict_abuse():
"""Test dict abuse."""
Expand All @@ -100,17 +100,6 @@ def test_dict_abuse():
with pytest.raises(TypeError):
Test.PublicArrayTest.__getitem__(0, 0)

with pytest.raises(TypeError):
Test.PublicArrayTest.__setitem__(0, 0, 0)

with pytest.raises(TypeError):
desc = Test.PublicArrayTest.__dict__['__getitem__']
desc(0, 0)

with pytest.raises(TypeError):
desc = Test.PublicArrayTest.__dict__['__setitem__']
desc(0, 0, 0)

def test_InheritedDictionary():
"""Test class that inherited from IDictionary."""
items = Test.InheritedDictionaryTest()
Expand Down
8 changes: 3 additions & 5 deletions tests/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,12 @@ def test_raise_instance_exception_with_args():
assert isinstance(exc, NullReferenceException)
assert exc.Message == 'Aiiieee!'


def test_managed_exception_propagation():
"""Test propagation of exceptions raised in managed code."""
from System import Decimal, OverflowException

with pytest.raises(OverflowException):
Decimal.ToInt64(Decimal.MaxValue)
from System import Decimal, DivideByZeroException

with pytest.raises(DivideByZeroException):
Decimal.Divide(1, 0)

def test_managed_exception_conversion():
"""Test conversion of managed exceptions."""
Expand Down
25 changes: 0 additions & 25 deletions tests/test_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,31 +333,6 @@ def test_double_indexer():
ob["wrong"] = "wrong"


def test_decimal_indexer():
"""Test Decimal indexers."""
ob = Test.DecimalIndexerTest()

from System import Decimal
max_d = Decimal.Parse("79228162514264337593543950335")
min_d = Decimal.Parse("-79228162514264337593543950335")

assert ob[max_d] is None

ob[max_d] = "max_"
assert ob[max_d] == "max_"

ob[min_d] = "min_"
assert ob[min_d] == "min_"

with pytest.raises(TypeError):
ob = Test.DecimalIndexerTest()
ob["wrong"]

with pytest.raises(TypeError):
ob = Test.DecimalIndexerTest()
ob["wrong"] = "wrong"


def test_string_indexer():
"""Test String indexers."""
ob = Test.StringIndexerTest()
Expand Down