ָE D d Z ddlZddlZddlmZ d Zd Zd Z d Z d ZdS ) a Tests for the private NumPy argument parsing functionality. They mainly exists to ensure good test coverage without having to try the weirder cases on actual numpy functions but test them in one place. The test function is defined in C to be equivalent to (errors may not always match exactly, and could be adjusted): def func(arg1, /, arg2, *, arg3): i = integer(arg1) # reproducing the 'i' parsing in Python. return None N)argparse_example_functionc t j t d 5 t d d d d n# 1 swxY w Y t j t 5 t ddz d d d d S # 1 swxY w Y d S )Nz$integer argument expected, got floatmatchg ? d )pytestraises TypeErrorfunc OverflowError r/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib64/python3.11/site-packages/numpy/core/tests/test_argparse.pytest_invalid_integersr s y8 : : : R } % % QV s 8<<A<<B B c t j t d 5 t d d d n# 1 swxY w Y t j t d 5 t dd d d d n# 1 swxY w Y t j t d 5 t dd d d d d S # 1 swxY w Y d S ) Nz&missing required positional argument 0r )arg2arg3z,missing required argument \'arg2\' \(pos 1\) )r r r r r r r r test_missing_argumentsr s y: <