ָEDdZddlZddlZddlmZdZdZdZ dZ dZ dS) 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_functionctjtd5tddddn #1swxYwYtjt5tddzddddS#1swxYwYdS)Nz$integer argument expected, got floatmatchg?d)pytestraises TypeErrorfunc OverflowErrorr/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib64/python3.11/site-packages/numpy/core/tests/test_argparse.pytest_invalid_integersrs y8 : : : R } % % QV s8<<A<<BBctjtd5tdddn #1swxYwYtjtd5tdddddn #1swxYwYtjtd5tddddddS#1swxYwYdS) Nz&missing required positional argument 0r)arg2arg3z,missing required argument \'arg2\' \(pos 1\))rr r r r rrrtest_missing_argumentsrs y: < < <  y: < < < !! yA C C C QQs07;;A;;A?A?!CCCctjtd5tddddddddS#1swxYwYdS)Nz7takes from 2 to 3 positional arguments but 4 were givenrrrrrrrrtest_too_many_positionalr(s yK M M M Q1a<AActjtd5tdddddddS#1swxYwYdS)Nz4given by name \('arg2'\) and position \(position 1\)rrrr)rrrrrtest_multiple_valuesr/s yI K K K Qrctjd}tjd}tdi|ditjt d5td i|diddddS#1swxYwYdS) Nr missing_argrrz0got an unexpected keyword argument 'missing_arg'rr)r)r)npstr_r r r r )rr!s rtest_string_fallbacksr$5s 76??D'-((KtQi yD F F F$$ ##;"###$$$$$$$$$$$$$$$$$$sA..A25A2) __doc__r numpyr"numpy.core._multiarray_testsrr rrrrr$rrrr(s   JJJJJJ    $$$$$r