summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhippo91 <guillaume.peillex@gmail.com>2019-12-30 13:40:42 +0100
committerhippo91 <guillaume.peillex@gmail.com>2019-12-30 13:40:42 +0100
commit4fc45c581523e4883937e1b7a5314e434e8f3125 (patch)
tree0db0d88ad8a723f9574c2e67a4c46a6099ce26a3
parent0cd44c7616a4018e26cda48d65b2fe2781392ed1 (diff)
downloadastroid-git-4fc45c581523e4883937e1b7a5314e434e8f3125.tar.gz
Insures that numpy functions returning arrays are inferred only as array and not [array, Uninferable] because it could lead to false negatives.
-rw-r--r--tests/unittest_brain_numpy_core_umath.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/unittest_brain_numpy_core_umath.py b/tests/unittest_brain_numpy_core_umath.py
index 3307a8c1..2a78a1eb 100644
--- a/tests/unittest_brain_numpy_core_umath.py
+++ b/tests/unittest_brain_numpy_core_umath.py
@@ -216,11 +216,9 @@ class NumpyBrainCoreUmathTest(unittest.TestCase):
with self.subTest(typ=func_):
inferred_values = list(self._inferred_numpy_func_call(func_))
self.assertTrue(
- len(inferred_values) == 1
- or len(inferred_values) == 2
- and inferred_values[-1].pytype() is util.Uninferable,
+ len(inferred_values) == 1,
msg="Too much inferred values ({}) for {:s}".format(
- inferred_values[-1].pytype(), func_
+ inferred_values, func_
),
)
self.assertTrue(