summaryrefslogtreecommitdiff
path: root/numpy/tests
diff options
context:
space:
mode:
authorwarren <warren.weckesser@gmail.com>2021-11-03 01:20:07 -0400
committerwarren <warren.weckesser@gmail.com>2021-11-03 01:20:07 -0400
commiteb5e7c683fd9cc4b5c967e2260ae11f4365494a6 (patch)
tree1900aba011fb0e02d693aa5983a524d52b7a323c /numpy/tests
parentc3fb434ad0f03a75f645ca0ea800894fda126a55 (diff)
downloadnumpy-eb5e7c683fd9cc4b5c967e2260ae11f4365494a6.tar.gz
BUG: Fix duplication of names in 'numpy.__all__'.
Closes gh-10198.
Diffstat (limited to 'numpy/tests')
-rw-r--r--numpy/tests/test__all__.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/tests/test__all__.py b/numpy/tests/test__all__.py
new file mode 100644
index 000000000..e44bda3d5
--- /dev/null
+++ b/numpy/tests/test__all__.py
@@ -0,0 +1,9 @@
+
+import collections
+import numpy as np
+
+
+def test_no_duplicates_in_np__all__():
+ # Regression test for gh-10198.
+ dups = {k: v for k, v in collections.Counter(np.__all__).items() if v > 1}
+ assert len(dups) == 0