HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/numpy/tests/__pycache__/test_numpy_version.cpython-310.pyc
o

���g��@s4dZddlZddlZddlmZdd�Zdd�ZdS)aY
Check the numpy version is valid.

Note that a development version is marked by the presence of 'dev0' or '+'
in the version string, all else is treated as a release. The version string
itself is set from the output of ``git describe`` which relies on tags.

Examples
--------

Valid Development: 1.22.0.dev0 1.22.0.dev0+5-g7999db4df2 1.22.0+5-g7999db4df2
Valid Release: 1.21.0.rc1, 1.21.0.b1, 1.21.0
Invalid: 1.22.0.dev, 1.22.0.dev0-5-g7999db4dfB, 1.21.0.d1, 1.21.a

Note that a release is determined by the version string, which in turn
is controlled by the result of the ``git describe`` command.
�N)�assert_cCs2d}d}t�||dtj�}t|dutj�dS)Nz/^[0-9]+\.[0-9]+\.[0-9]+(a[0-9]|b[0-9]|rc[0-9])?z'(\.dev[0-9]+(\+git[0-9]+\.[0-9a-f]+)?)?�$)�re�match�np�__version__r)�version_pattern�
dev_suffix�res�r�I/usr/local/lib/python3.10/dist-packages/numpy/tests/test_numpy_version.py�test_valid_numpy_versionsr
cCsBtjjrttjtjjkd�dSttj�d�dtjjkd�dS)Nz)short_version mismatch in release version�+rz-short_version mismatch in development version)r�version�releaserr�
short_version�splitrrrr�test_short_version"s��r)�__doc__r�numpyr�
numpy.testingrr
rrrrr�<module>s