summaryrefslogtreecommitdiff
path: root/numpy/tests/test_scripts.py
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: cleanup unused imports; avoid redefinition of importsMike Taves2020-02-061-1/+1
| | | | | | | * Cleanup unused imports (F401) of mostly standard Python modules, or some internal but unlikely referenced modules * Where internal imports are potentially used, mark with noqa * Avoid redefinition of imports (F811)
* MAINT: Replace basestring with str.Charles Harris2020-01-231-1/+0
| | | | | | | This replaces basestring with str except in - tools/npy_tempita/ - numpy/compat/py3k.py
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-2/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* BUG,TST: Remove the misguided `run_command` that wraps subprocess in a ↵Eric Wieser2018-12-181-71/+16
| | | | | | broken way Also switches to using a parametrized test, for better error messages
* DEV: add test for 'python -mnumpy.f2py'mattip2018-12-181-0/+5
|
* MAINT: Review F401,F841,F842 flake8 errors (unused variables and imports) ↵Roman Yurchak2018-12-061-1/+1
| | | | | | | | | | | | (#12448) * Review F401,F841,F842 flake8 errors (unused variables, imports) * Review comments * More tests in test_installed_npymath_ini * Review comments
* removing warningsEric Schles2018-09-251-1/+0
|
* updating test file to ignore the failureEric Schles2018-09-251-10/+4
|
* updating f2py to ensure that at least f2py base exists, and doesn't error ↵Eric Schles2018-09-251-3/+11
| | | | out if multiple do not
* ENH: Use entry_points to install the f2py scripts.Charles Harris2018-08-231-20/+25
| | | | | | | | | | | | | | | | | | | | | This adds entry_points for the f2py scripts. The installed scripts differ between Windows and other environments. * On Windows, the only script installed is 'f2py'. This works well in that environment because each Python version is installed in its own directory, making it easy to keep the differing script versions separate. * Otherwise, three scripts are installed, 'f2py', 'f2py' + 'minor', and 'f2py' + 'major.minor'. For instance, if Numpy is installed by Python 2.7, then the installed scripts will be named 'f2py', 'f2py2', and 'f2py2.7'. That naming scheme is used for back compatibility, and also so that more than one Python version can be dealt with in a way common to many Linux distros. Note that 'f2py' will always point to the latest install and 'f2py(2|3)' to the latest Python (2|3) install The script tests have been modified to check for the new environment and the code previously used to install the scripts has been removed.
* TST: Switch to using pytest markersCharles Harris2018-04-041-4/+5
| | | | | | | | | | | Use standard pytest markers everywhere in the numpy tests. At this point there should be no nose dependency. However, nose is required to test the legacy decorators if so desired. At this point, numpy test cannot be run in the way with runtests, rather installed numpy can be tested with `pytest --pyargs numpy` as long as that is not run from the repo. Run it from the tools directory or some such.
* MAINT: Rearrange files in numpy/testing module.Charles Harris2017-07-041-3/+2
| | | | | | | | | | | | | | | | | The aim here is to separate out the nose dependent files prior to adding pytest support. This could be done by adding new files to the general numpy/testing directory, but I felt that it was to have the relevant files separated out as it makes it easier to completely remove nose dependencies when needed. Many places were accessing submodules in numpy/testing directly, and in some cases incorrectly. That presented a backwards compatibility problem. The solution adapted here is to have "dummy" files whose contents will depend on whether of not pytest is active. That way the module looks the same as before from the outside. In the case of numpy itself, direct accesses have been fixed. Having proper `__all__` lists in the submodules helped in that.
* BUG: KeyboardInterrupt is swallowed all over the placeEric Wieser2017-06-031-1/+1
| | | | Bare except is very rarely the right thing
* MAINT: Remove asbytes where a b prefix would sufficeEric Wieser2017-03-251-3/+3
| | | | | | | | Since we only need to support python 2, we can remove any case where we just pass a single string literal and use the b prefix instead. What we can't do is transform asbytes("tests %d" % num), because %-formatting fails on bytes in python 3.x < 3.5.
* MAINT: Use `is None` or `is not None` instead of `== None` or `!= None`.Dongjoon Hyun2016-02-151-1/+1
|
* TST: Fixed f2py test for Anaconda non-win32gfyoung2016-02-021-8/+3
| | | | | | | | | | | When you run 'python -V' under Anaconda, it returns for example, 'Python 3.4.3 :: Continuum Analytics, Inc.' However, the original parsing of the version in 'test_f2py' assumed there was nothing following the version number, causing a ValueError because you can't assign three variables to four components that you get from splitting on the '.'
* TST: Fixed f2py test for non-versioned python executablesgfyoung2016-01-251-4/+13
| | | | | | | | | | | The 'sys.executable' can come in various names, but the three main ones are "python", "python{major_version}", and "python{major_version.minor_version}". The current version of the f2py test assumes that only the latter two are used. Since "f2py" is generally versioned, using the executable basename "python" will make it impossible to find. This commit fixes that issue by using a sure-fire way of getting the Python version.
* TST: Fixed f2py test for win32 virtualenvgfyoung2016-01-251-1/+7
| | | | | | | | Fixed test_scripts.test_f2py test so that it can pass correctly on win32 virtualenvs, in which the Python executable and the f2py.py file are both in the Scripts directory.
* BUG: ignore exceptions in numpy/tests/test_scripts.py/test_f2pCharles Harris2015-12-261-4/+5
| | | | | | | | The test was checking whether the f2py script was installed as either of two names, but was only catching OSError, so the second check was skipped if the first failed for another reason. The caused the runtests.py script to fail it does not install the script as f2py but rather with the python version appended.
* BUG: Fix use of python 3 only FileNotFoundError in test_f2py.Charles Harris2015-12-161-4/+5
| | | | | Also rewrite error messages so that they read more like warnings than errors.
* TST: test f2py, fallback on f2py2.7 etc., fixes #6718Jörn Hees2015-12-051-3/+15
|
* TST: on Windows run f2py from the Scripts directoryChristoph Gohlke2015-08-011-2/+6
|
* TEST: add module to test installed scriptsMatthew Brett2015-04-301-0/+65
Module tests whether we can run f2py and return correct version. Skip this test when running in-place (we don't install f2py in that case). Use our own virtualenvs in travis-ci to avoid picking up travis' numpy.