summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-09-28 15:27:23 -0600
committerCharles Harris <charlesr.harris@gmail.com>2015-09-28 15:27:23 -0600
commite6dbcead884019bd2aee802f78c41f6a9c46cd61 (patch)
tree5839c4d94f311a960b9491c6eac019d47a48dfe9 /numpy/core
parentf43d691fd0b9b4f416b50fba34876691af2d0bd4 (diff)
parent032951dc09ae110f3260cf29abf9d584bda262a7 (diff)
downloadnumpy-e6dbcead884019bd2aee802f78c41f6a9c46cd61.tar.gz
Merge pull request #6384 from anntzer/fill-default-dtype-futurewarning
Add tests.
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/tests/test_deprecations.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/numpy/core/tests/test_deprecations.py b/numpy/core/tests/test_deprecations.py
index 3e76409c5..e3aea7efb 100644
--- a/numpy/core/tests/test_deprecations.py
+++ b/numpy/core/tests/test_deprecations.py
@@ -374,5 +374,15 @@ class TestBooleanIndexShapeMismatchDeprecation():
arr.__getitem__, (slice(None), index))
+class TestFullDefaultDtype:
+ """np.full defaults to float when dtype is not set. In the future, it will
+ use the fill value's dtype.
+ """
+
+ def test_full_default_dtype(self):
+ assert_warns(FutureWarning, np.full, 1, 1)
+ assert_warns(FutureWarning, np.full, 1, None)
+
+
if __name__ == "__main__":
run_module_suite()