summaryrefslogtreecommitdiff
path: root/numpy/f2py/tests
Commit message (Collapse)AuthorAgeFilesLines
* BUG, TST: fix f2py for PyPy, skip one test for PyPy (#15750)Matti Picus2020-03-187-34/+28
| | | * BUG, TST: fix f2py for PyPy, skip one test for PyPy, xfail tests for s390x
* MAINT: cleanup unused imports; avoid redefinition of importsMike Taves2020-02-062-3/+0
| | | | | | | * 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)
* STY: use `with open` when possibleSeth Troisi2020-01-211-3/+2
|
* MAINT: Remove sys.version checks in testsSeth Troisi2020-01-151-2/+0
|
* MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-053-7/+7
| | | | | | | Inheriting from object was necessary for Python 2 compatibility to use new-style classes. In Python 3, this is unnecessary as there are no old-style classes. Dropping the object is more idiomatic Python.
* Merge pull request #15232 from sethtroisi/remove_python3_part3Matti Picus2020-01-041-2/+0
|\ | | | | MAINT: Cleaning up PY_MAJOR_VERSION/PY_VERSION_HEX
| * Cleaning up PY_MAJOR_VERSION/PY_VERSION_HEXSeth Troisi2020-01-031-2/+0
| |
* | Merge pull request #14376 from jdufresne/futureSebastian Berg2020-01-0321-43/+0
|\ \ | |/ |/| MAINT: Remove unnecessary 'from __future__ import ...' statements
| * MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-0321-43/+0
| | | | | | | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* | MAINT: Remove Python2 specific C module setup (gh-15231)Seth Troisi2020-01-031-11/+1
|/ | | | | Dropping the support for python 2, the difference in module setup do not have to be accounted for anymore. This removes the macros and ifdef's related to module setup code and python 2 support.
* TST: f2py: fix race condition in f2py test _get_compiler_statusPauli Virtanen2019-12-141-3/+9
| | | | | | Distutils code needs to run in different temporary directories, probably because they create `_configtest.c` files for compiler detection in the current directory.
* ENH: f2py: add --f2cmap option for specifying the name of .f2py_f2cmapPauli Virtanen2019-12-142-6/+27
| | | | | | | | | | | | | Previously, f2py loaded the type mappings from a file ``.f2py_f2cmap`` in current directory, at import time. Make the file name customizable by adding a ``--f2cmap`` command line option, and postpone loading the file to f2py.run_main(). Moreover, restore the default type mapping in f2py.run_main() before loading the customizations, so that multiple calls to f2py.run_main() do not interfere with each other. (For example, numpy.distutils calls f2py multiple times in the same process.)
* MAINT: fixes from reviewmattip2019-12-031-3/+4
|
* BUG: add endfunction, endsubroutine to valid fortran end wordsmattip2019-12-031-0/+39
|
* BUG: Further, followup f2py reference count fixesSebastian Berg2019-08-193-9/+28
| | | | | | | | Note that the extension module dict seems to be never dereferenced (there is an additional reference to it kept around somewhere). This reference seems to part of the C python module loading (possibly intentionally), and I could not find how to remove it or where it originates from.
* BUG: General fixes to f2py reference counts (dereferencing)Sebastian Berg2019-08-191-56/+64
|
* TEST: update for PyPymattip2019-04-171-1/+2
|
* MAINT: Use textwrap.dedent in f2py testsEric Wieser2019-04-103-43/+42
| | | | Don't touch the fortran files, since indentation is signficant there and it makes things more error-prone
* BUG: Fix testing of f2py.compile from strings.Charles Harris2019-01-202-14/+17
| | | | | | | The test should not be run if there is no Fortran compiler. This PR moves it to `numpy/f2py/tests/test_compile_function.py`, which is appropriate for the test and a place where the presence of the needed compilers is already checked for.
* BUG, DOC: test, fix that f2py.compile accepts str and bytes, rework docsmattip2019-01-201-0/+14
|
* MAINT: Review F401,F841,F842 flake8 errors (unused variables and imports) ↵Roman Yurchak2018-12-065-10/+1
| | | | | | | | | | | | (#12448) * Review F401,F841,F842 flake8 errors (unused variables, imports) * Review comments * More tests in test_installed_npymath_ini * Review comments
* TST, MAINT: Skip some f2py tests on Mac.Charles Harris2018-10-072-4/+15
| | | | | | There is a not yet understood problem in testing f2py C modules (*.pyf) files on the Mac that manifests as erratic module import failures.' This disables those tests until we can figure out what the problem is.
* TST: add macos azure testing to CI.Tyler Reddy2018-09-281-0/+7
|
* MAINT: remove duplicate importsmattip2018-09-261-2/+0
|
* Merge pull request #11894 from QuLogic/f2py-test-parametrizeCharles Harris2018-09-227-47/+48
|\ | | | | TST: Parametrize f2py tests.
| * TST: Use fixture around f2py shared memory tests.Elliott Sales de Andrade2018-09-061-11/+9
| | | | | | | | | | This allows to parametrize the entire class without having to do any trickery with eval.
| * TST: Parametrize f2py tests.Elliott Sales de Andrade2018-09-066-36/+39
| |
* | Merge pull request #12014 from tylerjereddy/issue_12013_pytest_skipCharles Harris2018-09-212-7/+8
|\ \ | | | | | | TST: prefer pytest.skip() over SkipTest
| * | BUG: Fix missing pytest import.Charles Harris2018-09-211-0/+1
| | | | | | | | | `test_array_from_pyobj.py` needs to import pytest.
| * | TST: prefer pytest.skip() over SkipTestTyler Reddy2018-09-212-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * replace most usage of SkipTest() with pytest.skip() * where possible, we avoid use of the standard library SkipTest because unittest skipping is routed through the pytest nose compatibility layer in that scenario, which can prevent an easy trace back to the test line where the skip occurred
* | | BUG: Fix f2py test_compile_function.py tests.Charles Harris2018-09-211-74/+61
| | | | | | | | | | | | | | | | | | The tests were failing on platforms without a fortran compiler as that was not being checked for. Add that check among others and clean up the test functions a bit.
* | | TST, MAINT: Separate f2py compile function testing into own fileCharles Harris2018-09-202-105/+125
|/ / | | | | | | | | | | | | Create new file `test_compile_function.py` for the test, transferring the content from `test_quoted_characters.py` where it was before. The tricky part here is maintaining the history in both files after the move.
* | MAINT: remove exec_command() from f2py initTyler Reddy2018-09-181-0/+110
|/ | | | | * replaced the usage of exec_command() in the f2py init with standard library equivalent
* MAINT: Remove all uses of run_module_suite.Charles Harris2018-04-0617-77/+19
| | | | | That function is nose specific and has not worked since `__init__` files were added to the tests directories.
* TST: Switch to using pytest markersCharles Harris2018-04-0417-61/+88
| | | | | | | | | | | 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: Hard tab and whitespace cleanup.Charles Harris2018-03-082-19/+19
|
* TST: test handling ';' in multiline and enhancement lines, numpy.f2pyBob Eldering2018-03-081-0/+53
| | | | | | Regression tests for bug discussed in pull request #10676. Lines matching the multiline or f2py enhancement pattern should not be split by ';'.
* BUG: F2py mishandles quoted control characters (#10676)bobeldering2018-03-041-0/+32
| | | | | | | | | | | | | | | | | * BUG: improve parsing of quoted control characters in numpy.f2py. See #10634. Fixes a couple of cases where quoted control characters are parsed as if they are unquoted. The control characters considered are "()!;". * TST: quoted characters parsing by numpy.f2py. Basic test of parsing quoted Fortran control characters. See #10634. * BUG: add missing space character when reconstructing fortran line. The missing space caused a line starting with "!f2py" to be considered a continuation line.
* MAINT: Look up typeinfo properties by name, not by indexEric Wieser2017-12-061-10/+11
|
* MAINT: Use a StructSequence in place of the typeinfo tuplesEric Wieser2017-12-061-1/+1
| | | | This makes the contents of `typeinfo` look liked namedtuples
* TST: Test f2py passing string array to callback.Charles Harris2017-11-151-2/+32
| | | | See #10027.
* DEP, ENH: deprecate UPDATEIFCOPY (except for nditer) and replace with ↵Matti Picus2017-11-082-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WRITEBACKIFCOPY (#9639) * ENH: add API to resolve UPDATEONCOPY outside dealloc, test and use * BUG: Fix usage of keyword "from" as argument name for "can_cast". Also removed inconsistency between the second argument name between documentation ("totype") and code ("to"). * UPDATEIFCOPY -> WRITEBACKIFCOPY, documentation * fixes for review * review2, fix new test * fix new test for using self.assert_deprecated * change deprecation logic as per review * new logic exposed places where PyArray_ResolveWritebackIfCopy not called * deprecate PyArray_XDECREF_ERR in favor of PyArray_DiscardWritebackIfCopy * code review changes * clean up merge cruft * fix from review * fixes from review * extend the release note
* TST: callback: update commentxoviat2017-09-091-1/+1
|
* TST: block docstring: update commentxoviat2017-09-091-1/+1
|
* TST: common: update documentationxoviat2017-09-091-1/+1
|
* TST: util: update documentationxoviat2017-09-091-1/+1
|
* TST: fix failures:xoviat2017-09-044-7/+13
| | | | | | 1. fail tests related to DLL load failure as they were previously untested. 2. fix have_compiler to return false on old compilers 3. xfail some tests that were not working on old Python versions.
* [TST] slightly simplify f2py testNico Schlömer2017-08-291-2/+1
|
* [TST] fix test for 0-sized array operationsNico Schlömer2017-08-281-2/+3
|
* [TST] add tests for 0-sized Fortran arraysNico Schlömer2017-08-281-0/+9
|