[Consider merging] fixed rba and pya test because of argument error message change

This commit is contained in:
Matthias Koefferlein 2022-08-07 18:12:19 +02:00
parent e1882b0de7
commit c23b00aa7f
2 changed files with 4 additions and 4 deletions

View File

@ -1011,7 +1011,7 @@ class BasicTest(unittest.TestCase):
self.assertEqual( False, True ) # this must never hit
except Exception as e:
err = str(e)
self.assertEqual( err, "Unexpected object type (expected argument of class A, got X) in B.b4" );
self.assertEqual( err, "Unexpected object type (expected argument of class A, got X) for argument #1 in B.b4" );
# Test, if this throws an error (object of class X passed to A argument):
err = ""
@ -1022,7 +1022,7 @@ class BasicTest(unittest.TestCase):
self.assertEqual( False, True ) # this must never hit
except Exception as e:
err = str(e)
self.assertEqual( err, "Unexpected object type (expected argument of class A, got B) in B.b4" );
self.assertEqual( err, "Unexpected object type (expected argument of class A, got B) for argument #1 in B.b4" );
def test_17(self):

View File

@ -925,7 +925,7 @@ class Basic_TestClass < TestBase
assert_equal( b.b4( Y.new ), "b4_result: -6" )
assert_equal( false, true ) # this must never hit
rescue
assert_equal( $!.to_s(), "Unexpected object type (expected argument of class A, got Basic_TestClass::Y) in B::b4" );
assert_equal( $!.to_s(), "Unexpected object type (expected argument of class A, got Basic_TestClass::Y) for argument #1 in B::b4" );
end
# Test, if this throws an error (object of class X passed to A argument):
@ -935,7 +935,7 @@ class Basic_TestClass < TestBase
assert_equal( b.b4( bb ), "b4_result: -6" )
assert_equal( false, true ) # this must never hit
rescue
assert_equal( $!.to_s(), "Unexpected object type (expected argument of class A, got RBA::B) in B::b4" );
assert_equal( $!.to_s(), "Unexpected object type (expected argument of class A, got RBA::B) for argument #1 in B::b4" );
end
end