Hi,
the attached file contains a number of simple unit tests for the Python interface. Apart from Python-2.7 and GDL, it needs numpy and pytest. These tests find some problems:
- directly calling sin() crashes (fixed). Calling via a user defined function works, however.
- Returning arrays fails for their second half (fixed)
- The GDL path is not set (fixed)
- Integers with more than 32 bit (f.e.
2**45-1
) don't work as arguments,
- Complex numbers dont work as arguments (but arrays with
numpy.complex64
do)
- Unicode strings dont work as arguments (normal strings do, however),
- Numpy arrays of the types
int
, long
, numpy.int8
, numpy.uint16
dont work (but numpy.uint8
and numpy.int16
do)
- Lists, tuples, and dicts don't work as arguments,
- Arguments cannot be changed within a GDL procedure or function,
- Invalid GDL code leads to the abortion of the Python program instead of just raising an error
added in src/py