Skip to content

Commit f42750e

Browse files
committed
fix JUnit tests that actually would fail on CPython
1 parent 851221e commit f42750e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/test/builtin/SpecialMethodTests.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void __add__0() {
3939
" def __add__(self, other):\n" + //
4040
" return Num(self.n + other.n)\n" + //
4141
" def __repr__(self):\n" + //
42-
" return self.n\n" + //
42+
" return str(self.n)\n" + //
4343
"" + //
4444
"n0 = Num(42)\n" + //
4545
"n1 = Num(1)\n" + //
@@ -55,7 +55,7 @@ public void __add__1() {
5555
" def __add__(self, other):\n" + //
5656
" return Num(self.n + other)\n" + //
5757
" def __repr__(self):\n" + //
58-
" return self.n\n" + //
58+
" return str(self.n)\n" + //
5959
"" + //
6060
"n0 = Num(42)\n" + //
6161
"print(n0 + 1)\n";
@@ -70,7 +70,7 @@ public void __add__2() {
7070
" def __radd__(self, other):\n" + //
7171
" return Num(self.n + other)\n" + //
7272
" def __repr__(self):\n" + //
73-
" return self.n\n" + //
73+
" return str(self.n)\n" + //
7474
"" + //
7575
"n0 = Num(42)\n" + //
7676
"print(1 + n0)\n";
@@ -87,7 +87,7 @@ public void __add__And__rand__Polymorphic() {
8787
" def __radd__(self, other):\n" + //
8888
" return Num(self.n + other)\n" + //
8989
" def __repr__(self):\n" + //
90-
" return self.n\n" + //
90+
" return str(self.n)\n" + //
9191
"" + //
9292
"def doAdd(left, right):\n" + //
9393
" return left + right\n" + //
@@ -104,7 +104,7 @@ public void __sub__() {
104104
" def __sub__(self, other):\n" + //
105105
" return Num(self.n - other.n)\n" + //
106106
" def __repr__(self):\n" + //
107-
" return self.n\n" + //
107+
" return str(self.n)\n" + //
108108
"" + //
109109
"n0 = Num(42)\n" + //
110110
"n1 = Num(1)\n" + //
@@ -120,7 +120,7 @@ public void __eq__() {
120120
" def __eq__(self, other):\n" + //
121121
" return type(self) == type(other) and self.n == other.n\n" + //
122122
" def __repr__(self):\n" + //
123-
" return self.n\n" + //
123+
" return str(self.n)\n" + //
124124
"" + //
125125
"n0 = Num(1)\n" + //
126126
"n1 = Num(1)\n" + //

0 commit comments

Comments
 (0)