NumpyResolveRater will not change member rate if NDARRAY type is not found

This commit is contained in:
Semyon Proshev
2016-12-01 15:19:00 +03:00
parent dc730e866d
commit 42c6c1be3e
2 changed files with 13 additions and 2 deletions
@@ -481,6 +481,17 @@ public class Py3TypeTest extends PyTestCase {
"expr = sum([1, 2, 3])");
}
public void testDecimalDividedByInt() {
doTest("Union[int, Decimal]",
"class Decimal(object):\n" +
" def __div__(self, other):\n" +
" \"\"\"\n" +
" :rtype: Decimal" +
" \"\"\"\n" +
" pass\n" +
"expr = Decimal() / 5");
}
private void doTest(final String expectedType, final String text) {
myFixture.configureByText(PythonFileType.INSTANCE, text);
final PyExpression expr = myFixture.findElementByText("expr", PyExpression.class);