summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unittest_brain_numpy_core_umath.py8
-rw-r--r--tests/unittest_inference.py5
-rw-r--r--tests/unittest_regrtest.py2
3 files changed, 8 insertions, 7 deletions
diff --git a/tests/unittest_brain_numpy_core_umath.py b/tests/unittest_brain_numpy_core_umath.py
index 2d2abdbe..acfaeb70 100644
--- a/tests/unittest_brain_numpy_core_umath.py
+++ b/tests/unittest_brain_numpy_core_umath.py
@@ -65,6 +65,7 @@ class NumpyBrainCoreUmathTest(unittest.TestCase):
)
two_args_ufunc = (
+ "add",
"bitwise_and",
"bitwise_or",
"bitwise_xor",
@@ -92,6 +93,7 @@ class NumpyBrainCoreUmathTest(unittest.TestCase):
"logical_xor",
"maximum",
"minimum",
+ "multiply",
"nextafter",
"not_equal",
"power",
@@ -224,11 +226,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(
diff --git a/tests/unittest_inference.py b/tests/unittest_inference.py
index cfc05791..7b80b530 100644
--- a/tests/unittest_inference.py
+++ b/tests/unittest_inference.py
@@ -1301,7 +1301,7 @@ class InferenceTest(resources.SysPathSetup, unittest.TestCase):
result = node.inferred()
assert len(result) == 2
assert isinstance(result[0], nodes.Dict)
- assert result[1] is util.Uninferable
+ assert isinstance(result[1], nodes.Dict)
def test_python25_no_relative_import(self):
ast = resources.build_file("data/package/absimport.py")
@@ -3656,7 +3656,8 @@ class InferenceTest(resources.SysPathSetup, unittest.TestCase):
flow = AttributeDict()
flow['app'] = AttributeDict()
flow['app']['config'] = AttributeDict()
- flow['app']['config']['doffing'] = AttributeDict() #@
+ flow['app']['config']['doffing'] = AttributeDict()
+ flow['app']['config']['doffing']['thinkto'] = AttributeDict() #@
"""
)
self.assertIsNone(helpers.safe_infer(ast_node.targets[0]))
diff --git a/tests/unittest_regrtest.py b/tests/unittest_regrtest.py
index b75e3dfe..1444da30 100644
--- a/tests/unittest_regrtest.py
+++ b/tests/unittest_regrtest.py
@@ -93,7 +93,7 @@ class NonRegressionTests(resources.AstroidCacheSetupMixin, unittest.TestCase):
data = """
from numpy import multiply
-multiply(1, 2, 3)
+multiply([1, 2], [3, 4])
"""
astroid = builder.string_build(data, __name__, __file__)
callfunc = astroid.body[1].value.func