[pypy-dev] Looking into numpy ndarray.flags.writeable

Eli Stevens (Gmail) wickedgrey at gmail.com
Fri May 20 16:21:58 EDT 2016


Here you go: https://bitbucket.org/elistevens/pypy/commits/branch/numpy_flags_writeable

In particular, this produces different output based on the invoking interpreter.

https://bitbucket.org/elistevens/pypy/commits/922e80048e9c8ef71b3ea90171a1f8f06b04f00a?at=numpy_flags_writeable#Lpypy/module/micronumpy/test/test_flagsobj.pyT158

Things like:

    /Users/elis/venv/droidblue-pypy/site-packages/numpy/__init__.pyc

or

    /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/__init__.pyc

etc.

Cheers,
Eli

On Fri, May 20, 2016 at 12:55 PM, matti picus <matti.picus at gmail.com> wrote:
> You should commit your changes to a branch and push to a bitbucket repo so we can see your changes. Our test runner compiles part of PyPy and calls the tests using that partial interpreter (unless run with -A), when you call import numpy inside a test you are using micronumpy. You should not try to stop in a debugger in the test code itself (app level), rather print or set_trace inside micronumpy code (interpreter level).
> Matti
>
>
>> On 20 May 2016, at 10:18 PM, Eli Stevens (Gmail) <wickedgrey at gmail.com> wrote:
>>
>> I understand that the tests are in the test directory, but the issue
>> I'm currently trying to figure out is that when I invoke either of:
>>
>>    /usr/bin/python test_all.py test_all.py
>> module/micronumpy/test/test_flagsobj.py
>>
>>    /usr/bin/python pytest.py
>> pypy/module/micronumpy/test/test_flagsobj.py (a directory level up)
>>
>> With any of system cpython, venv cpython, venv pypy, etc. then the
>> changes that I've made locally to micronumpy aren't used, since inside
>> of the tests "import numpy" grabs the numpy from whatever interpreter
>> the tests were invoked with.
>>
>> I'm sure there's something simple that I'm missing about the
>> environment that's needed to make this work, but I haven't figured it
>> out yet. Do I need to be doing something with the PYTHONPATH prior to
>> running the tests?
>>
>> Cheers,
>> Eli
>>
>>
>>>


More information about the pypy-dev mailing list