Title: method overloading - more fun · Issue #190 · pythonnet/pythonnet · GitHub
Open Graph Title: method overloading - more fun · Issue #190 · pythonnet/pythonnet
X Title: method overloading - more fun · Issue #190 · pythonnet/pythonnet
Description: Right now we have if (_methods.Length > 1) as the first line of defense for overloading problems. The reason for this are about 30 failing tests if this condition is removed. Looks like this is an easy fix to these tests, but using prope...
Open Graph Description: Right now we have if (_methods.Length > 1) as the first line of defense for overloading problems. The reason for this are about 30 failing tests if this condition is removed. Looks like this is an ...
X Description: Right now we have if (_methods.Length > 1) as the first line of defense for overloading problems. The reason for this are about 30 failing tests if this condition is removed. Looks like this is ...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/190
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"method overloading - more fun","articleBody":"Right now we have `if (_methods.Length \u003e 1)` as the first line of defense for overloading problems. The reason for this are about 30 failing tests if this condition is removed.\n\nLooks like this is an easy fix to these tests, but using proper types in the code. e.g.\n\n`clr.setPreload(0)` should be changed to `clr.setPreload(False)`\n\nfull list here:\n\n``` python\n{ pythonnet_st } patch-8 » c:/python/python27/python.exe src/tests/runtests.py\nAttempting to load Python.Runtime using standard binding rules...\nAttempting to load Python.Runtime from: 'C:\\python\\python27\\lib\\site-packages\\Python.Runtime.dll'...\n..................E.....................................................E.EE........E.E..........E.EEE...E.EEE...........................................E..E..E..E......................E........EE...............................................EEE..E...........E...E...EEE.............................................................\n======================================================================\nERROR: testPreloadVar (test_module.ModuleTests)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_module.py\", line 59, in testPreloadVar\n clr.setPreload(0)\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testExplicitOverloadSelection (test_method.MethodTests)\nCheck explicit overload selection using [] syntax.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_method.py\", line 525, in testExplicitOverloadSelection\n value = MethodTest.Overloaded.__overloads__[System.Byte](255)\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testExplicitSelectionWithOutModifier (test_method.MethodTests)\nCheck explicit overload selection with out modifiers.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_method.py\", line 477, in testExplicitSelectionWithOutModifier\n \"hi\", \"there\"\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testExplicitSelectionWithRefModifier (test_method.MethodTests)\nCheck explicit overload selection with ref modifiers.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_method.py\", line 497, in testExplicitSelectionWithRefModifier\n \"hi\", \"there\"\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testObjectOutParams (test_method.MethodTests)\nTest use of object out-parameters.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_method.py\", line 370, in testObjectOutParams\n result = MethodTest.TestObjectOutParams(\"hi\", MethodTest())\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testObjectRefParams (test_method.MethodTests)\nTest use of object byref parameters.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_method.py\", line 385, in testObjectRefParams\n result = MethodTest.TestObjectRefParams(\"hi\", MethodTest())\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testStringOutParams (test_method.MethodTests)\nTest use of string out-parameters.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_method.py\", line 310, in testStringOutParams\n result = MethodTest.TestStringOutParams(\"hi\", \"there\")\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testStringRefParams (test_method.MethodTests)\nTest use of string byref parameters.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_method.py\", line 325, in testStringRefParams\n result = MethodTest.TestStringRefParams(\"hi\", \"there\")\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testStructOutParams (test_method.MethodTests)\nTest use of struct out-parameters.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_method.py\", line 400, in testStructOutParams\n result = MethodTest.TestStructOutParams(\"hi\",System.Guid.NewGuid())\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testStructRefParams (test_method.MethodTests)\nTest use of struct byref parameters.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_method.py\", line 415, in testStructRefParams\n result = MethodTest.TestStructRefParams(\"hi\",System.Guid.NewGuid())\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testValueOutParams (test_method.MethodTests)\nTest use of value type out-parameters.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_method.py\", line 340, in testValueOutParams\n result = MethodTest.TestValueOutParams(\"hi\", 1)\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testValueRefParams (test_method.MethodTests)\nTest use of value type byref parameters.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_method.py\", line 355, in testValueRefParams\n result = MethodTest.TestValueRefParams(\"hi\", 1)\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testVoidSingleOutParam (test_method.MethodTests)\nTest void method with single out-parameter.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_method.py\", line 430, in testVoidSingleOutParam\n result = MethodTest.TestVoidSingleOutParam(9)\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testVoidSingleRefParam (test_method.MethodTests)\nTest void method with single ref-parameter.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_method.py\", line 442, in testVoidSingleRefParam\n result = MethodTest.TestVoidSingleRefParam(9)\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testGenericMethodTypeHandling (test_generic.GenericTests)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_generic.py\", line 319, in testGenericMethodTypeHandling\n self._testGenericMethodByType(System.Byte, 255)\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_generic.py\", line 213, in _testGenericMethodByType\n result = stype.Overloaded[ptype](value)\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testGenericTypeBinding (test_generic.GenericTests)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_generic.py\", line 180, in testGenericTypeBinding\n self._testGenericWrapperByType(System.Byte, 255)\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_generic.py\", line 161, in _testGenericWrapperByType\n inst = GenericWrapper[ptype](value)\nTypeError: no constructor matches given arguments\n\n======================================================================\nERROR: testMethodOverloadSelectionWithGenericTypes (test_generic.GenericTests)\nCheck method overload selection using generic types.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_generic.py\", line 476, in testMethodOverloadSelectionWithGenericTypes\n input = vtype(255)\nTypeError: no constructor matches given arguments\n\n======================================================================\nERROR: testOverloadSelectionWithArraysOfGenericTypes (test_generic.GenericTests)\nCheck overload selection using arrays of generic types.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_generic.py\", line 615, in testOverloadSelectionWithArraysOfGenericTypes\n input = vtype([gtype(255), gtype(255)])\nTypeError: no constructor matches given arguments\n\n======================================================================\nERROR: testBasicSubclass (test_class.ClassTests)\nTest basic subclass of a managed class.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_class.py\", line 95, in testBasicSubclass\n table.set_Item('one', 'one')\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testOverrideGetItem (test_class.ClassTests)\nTest managed subclass overriding __getitem__.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_class.py\", line 196, in testOverrideGetItem\n table['one'] = 'one'\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testOverrideSetItem (test_class.ClassTests)\nTest managed subclass overriding __setitem__.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_class.py\", line 217, in testOverrideSetItem\n table['one'] = 'one'\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_class.py\", line 214, in __setitem__\n Hashtable.__setitem__(self, key, value)\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testBooleanIndexer (test_indexer.IndexerTests)\nTest boolean indexers.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_indexer.py\", line 95, in testBooleanIndexer\n self.assertTrue(object[1] == None)\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testByteIndexer (test_indexer.IndexerTests)\nTest byte indexers.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_indexer.py\", line 116, in testByteIndexer\n self.assertTrue(object[max] == None)\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testCharIndexer (test_indexer.IndexerTests)\nTest char indexers.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_indexer.py\", line 170, in testCharIndexer\n self.assertTrue(object[max] == None)\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testEnumIndexer (test_indexer.IndexerTests)\nTest enum indexers.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_indexer.py\", line 474, in testEnumIndexer\n self.assertTrue(object[key] == None)\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testObjectIndexer (test_indexer.IndexerTests)\nTest object indexers.\n----------------------------------------------------------------------Load clr import hook\nPython.Test.SubclassConstructorTest\n\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_indexer.py\", line 506, in testObjectIndexer\n self.assertTrue(object[\"spam\"] == None)\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testSByteIndexer (test_indexer.IndexerTests)\nTest sbyte indexers.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_indexer.py\", line 143, in testSByteIndexer\n self.assertTrue(object[max] == None)\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testUInt16Indexer (test_indexer.IndexerTests)\nTest UInt16 indexers.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_indexer.py\", line 278, in testUInt16Indexer\n self.assertTrue(object[max] == None)\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testUInt32Indexer (test_indexer.IndexerTests)\nTest UInt32 indexers.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_indexer.py\", line 305, in testUInt32Indexer\n self.assertTrue(object[max] == None)\nTypeError: No method matches given arguments\n\n======================================================================\nERROR: testUInt64Indexer (test_indexer.IndexerTests)\nTest UInt64 indexers.\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"C:\\Python\\pythonnet\\pythonnet_st\\src\\tests\\test_indexer.py\", line 332, in testUInt64Indexer\n self.assertTrue(object[max] == None)\nTypeError: No method matches given arguments\n\n----------------------------------------------------------------------\nRan 332 tests in 2.478s\n\nFAILED (errors=30)\nTraceback (most recent call last):\n File \"src/tests/runtests.py\", line 70, in \u003cmodule\u003e\n main(1)\n File \"src/tests/runtests.py\", line 67, in main\n raise Exception(\"Tests failed\")\nException: Tests failed\n\n```\n","author":{"url":"https://github.com/den-run-ai","@type":"Person","name":"den-run-ai"},"datePublished":"2016-03-17T07:21:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/190/pythonnet/issues/190"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7df39203-358f-312f-e55f-15021999952b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8F86:26D9B9:34AA574:498D467:69711BAF |
| html-safe-nonce | 1e099dfc2192cc5dafe7f063b7d5d999cdc3f775187c865b73d32b0cd3081994 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Rjg2OjI2RDlCOTozNEFBNTc0OjQ5OEQ0Njc6Njk3MTFCQUYiLCJ2aXNpdG9yX2lkIjoiNDk5Mzc3Mjk5MzgxNzY4MDgxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e793f785546eb739b6ac8d4d7a6995cac7cdf48081a871376b674ecd77943d99 |
| hovercard-subject-tag | issue:141501077 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pythonnet/pythonnet/190/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0c30b89fd4649f96759115f2bb8e13445f06f1e16830261bb4af8fbda7cc6b27/pythonnet/pythonnet/issues/190 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0c30b89fd4649f96759115f2bb8e13445f06f1e16830261bb4af8fbda7cc6b27/pythonnet/pythonnet/issues/190 |
| og:image:alt | Right now we have if (_methods.Length > 1) as the first line of defense for overloading problems. The reason for this are about 30 failing tests if this condition is removed. Looks like this is an ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | den-run-ai |
| hostname | github.com |
| expected-hostname | github.com |
| None | 73ca43ac10b0f114fadc2d2cf702bc0c6453174aa5f9dad3a1d131b428870c6d |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c16e50bde10edd19f5772e9b3804df6d7bf9bfe |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width