tests/basics/object_new2: Update checks for extra args to __new__.
These are now allowed in Pycopy. CPython is more picky when they are allowed
and when not, so the latter checks are disabled for now.
@@ -31,10 +31,11 @@ class A: pass
o2 = object.__new__(A)
print(type(o2).__name__)
-try:
- object.__new__(A, 1)
-except TypeError:
- print("TypeError4")
+# TODO: disabled for now, try to reinstate later.
+#try:
+# object.__new__(A, 1)
+#except TypeError:
+# print("TypeError4")
class B:
@@ -51,8 +52,8 @@ class C:
# CPython allows this, silently ignores extra params in this case
# (i.e. when __init__ is defined).
-#o4 = object.__new__(C, 1, 2, 3)
-#print(o4, dir(o4))
+o4 = object.__new__(C, 1, 2, 3)
+print(type(o4).__name__)
class D:
@@ -60,7 +61,8 @@ class D:
def __new__(self, a, b):
print(a, b)
-try:
- o5 = object.__new__(D, 1, 2)
-except TypeError:
- print("TypeError5")
+# TODO: disabled for now, try to reinstate later.
+#try:
+# o5 = object.__new__(D, 1, 2)
+#except TypeError:
+# print("TypeError5")
