From 03fd9f3d3b4e1925f9af34f0595aa69decde7efc Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Fri, 29 Mar 2024 17:29:19 +0100 Subject: [PATCH] TST: add a test that the `np.version` public content is as expected [skip azp] [skip cirrus] --- numpy/tests/test_numpy_version.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/numpy/tests/test_numpy_version.py b/numpy/tests/test_numpy_version.py index 61643426c8d7..d3abcb92c1c3 100644 --- a/numpy/tests/test_numpy_version.py +++ b/numpy/tests/test_numpy_version.py @@ -39,3 +39,16 @@ def test_short_version(): else: assert_(np.__version__.split("+")[0] == np.version.short_version, "short_version mismatch in development version") + + +def test_version_module(): + contents = set([s for s in dir(np.version) if not s.startswith('_')]) + expected = set([ + 'full_version', + 'git_revision', + 'release', + 'short_version', + 'version', + ]) + + assert contents == expected