| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This allows pytest to run with duplicate test file names. Note that
`python <path-to-test-file>` no longer works with this change, nor will
a simple `pytest numpy`, because numpy is imported from the numpy
repository. However, `python runtests.py` and `>>> numpy.test()` are
still available.
|
|\
| |
| | |
MAINT: Use new-style classes on 2.7
|
| |
| |
| |
| | |
Deliberately avoids tests, to prevent introducing a failure on old-style classes later.
|
|\ \
| |/
|/| |
Remove unittest dependencies
|
| | |
|
|/
|
|
|
| |
Using \t here is just cryptic.
Done using a very basic find and replace.
|
| |
|
|\
| |
| | |
ENH: Rearrange testing module to isolate nose dependency.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
| |
When building the __doc__ string for Fortran objects, the ')'
character, closing the dimensions list, is written 1 position
beyond the allowed buffer size, instead of the current pointer in
the buffer.
|
|
|
|
|
|
|
| |
* make exception raising 2/3 compatible
* remove unnecesary else statement after while loop without break clause
* ensure file is always enclosed even in the event of an exception
* ensure list comprehension variable does not override enclosing loop variable
|
| |
|
|
|
|
|
|
|
| |
A missing call to rmbadname1 in analyzecommon caused a look up of
common block variables with a name in the badnames list to fail
and the fall back of defaultimplicitrules to be used.
See ticket 9228.
|
|
|
|
| |
Bare except is very rarely the right thing
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Fix Fortran kind detection for PPC64el.
See: gh-3424.
|
|
|
|
| |
per request from @charris
|
|
|
|
|
|
|
| |
This augments the test in constant_compound.f90 by
using constants without a compound kind spec to
illustrate the case that led to the
reporting of issue #8493
|
|
|
|
|
| |
This is a test code provided as a patch by @zerothi checking
the compound constant parsing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fixes #8493
In the reported problem snippet the attempt to infer the type of
parameter (wasize=maxiterates*2)
leads to a lookup of maxiterates in the logic of get_parameters
which finds and correctly assigns to 'v' the value string '50000'
However, then in the logic proceds to attempt to split off any
underscore-appended precision spec from v_ which yields ['50000']
because there is no underscore.
Finally line
v = ''.join(v_[:-1]).lower().replace(v_[-1].lower(), '')
if not quarded by the newly introduced lengthtest sets v to empty
because [:-1] of a list with one element yields an empty list.
Subsequently the type inference by running eval on an empty string
fails with the error message quoted.
The introduced length check appears to correct this problem.
|
|
|
|
|
|
|
| |
In Python 3.6 a number of escape sequences that were previously accepted
-- for instance "\(" that was translated to "\\(" -- are deprecated. To
retain the previous behavior either raw strings must be used or the
backslash must be properly escaped itself.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fortran sources with parameters having kind-specifiers
where not correctly intercepted in the crackfortran.py
source.
The reason was a restrictive check for only integer specifiers
which did not split real's into the correct number.
Furthermore, several tests has been added which tests the different
kind specifiers and their use in codes, also all of them together.
Signed-off-by: Nick Papior <nickpapior@gmail.com>
|
|
|
|
| |
f2py.compile (issue #7683)
|
|
|
|
| |
It was committed mistakenly in #7134. `callfortran` is used a lot really.
|
| |
|
| |
|
|\
| |
| | |
MAINT: Simplify some tests using temppath context manager.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This replaces code of the pattern
```
fd, name = tempfile.mkstemp(...)
os.close(fd)
try:
do stuff with name
finally:
os.remove(name)
```
with
```
with temppath() as name:
do stuff with name
```
A few more complicated cases are also handled. The remains some
particularly gnarly code the could probably be refactored to use
temppath, but that is a more demanding project.
|
|/ |
|
| |
|
|
|
|
| |
Closes gh-6863.
|
|
|
|
|
| |
Add '.. versionadded:: 1.11.0' to the new `extension` parameter
in f2py.compile and document it in the 1.11.0 release notes.
|
|
|
|
|
| |
1. Verbose parameter was ignored earlier.
2. Allowed .f90 extensions for tempfiles
|
|
|
|
|
| |
Some newer *.py files are missing the `from __future__` boilerplate
that helps assure Python2 and Python3 compatibility.
|
|
|
|
|
|
|
|
| |
* use SkipTest in numpy tests instead of importing it from nose
* add a KnownFailureException as an alias for KnownFailureTest
(the former is preferred, but the latter is kept for backcompat)
* rename the KnownFailure nose plugin into KnownFailurePlugin,
and keep the old name for backcompat
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The files
* capi_maps.py
* crackfortran.py
* f90mod_rules.py
previously used `from .auxfuncs import *` and also called `eval`
without an explicit enviroment. An attempt to use explicit imports
led to errors, and because static code analysis in not sufficient
to determine what functions need to be imported, it is safest to
continue using `import *` pending a major refactoring of f2py.
Closes #6563.
|
|\
| |
| | |
Cleanup 6306: BUG: allow extension of common blocks in numpy.f2py
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Lack of this feature resulted in the generation of incorrect *.pyf
files.
For example, the pyf file created by:
subroutine sub3 (some arguments)
real a, b, c, d
common /coeff/ a, b
common /coeff/ c, d
<do stuff>
return
end
Should contain both common statements the declaration of all four
variables a, b, c, and d.
Closes #5876.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Nested use of parameters in specifying dimensions caused problems.
For example
parameter (i=7)
common buf(nvar*(nvar+1) * (n + 1))
This fix was suggested by Pearu on github.
Closes #5877.
|
|
|
|
|
|
|
| |
The fixes are generated by autopep8, which uses line continuation.
There are 441 cases that it is unable to handle, involving strings, and
that is more, and more delicate, work than I want to do at this time.
The line continuation characters at least mark some of the long lines.
|
| |
|
|
|
|
|
| |
Decided to bite the bullet on this one. The code is certainly more
readable, so should be easier to fix if we need to.
|
| |
|
| |
|
|
|
|
|
|
| |
bdist_mpkg is a very crude install method that will assume the path to
Python, so we should not use the `#!python` form when installing scripts
in bdist_mpkg.
|