Skip to content

Instantly share code, notes, and snippets.

View mattip's full-sized avatar

Matti Picus mattip

  • Quansight Labs
View GitHub Profile
@mattip
mattip / gist:f6d6c2f26f29f3ec67cb0686bc30a6d8
Last active September 5, 2016 15:09
numpy upstream 90668d0 with pypy 52eb4d9855de, FAILED (KNOWNFAIL=6, SKIP=33, errors=17, failures=14)
$ grep -a 'build/testenv/site-packages/numpy' ../test.out |grep 'test_[a-zA-Z_]*\.py' |cut -f10-12 -d'/' |cut -f1 -d '"' | sort | uniq -c | sort -n -r
7 core/tests/test_multiarray.py
4 core/tests/test_regression.py
3 core/tests/test_records.py
3 core/tests/test_nditer.py
3 core/tests/test_defchararray.py
2 core/tests/test_arrayprint.py
1 tests/test_scripts.py
1 tests/test_ctypeslib.py
1 matrixlib/tests/test_defmatrix.py
@mattip
mattip / gist:32fcd53ca8b44cefe25cb452a40f16d3
Last active July 24, 2017 17:31
run numpy with pyinteractive
UPDATE: this no longer works.
build, install numpy on pypy
copy pkg_resources, numpy-1.*, easy-install.pth from pypy/site-packages to /tmp/numpy
in pypy/module/cpyext/api.py change all 'cpyexttest' to 'PyPy'
then run
python pypy/bin/pyinteractive.py --withmod-struct --withmod-binascii --withmod-zipimport --withmod-_socket --withmod-cpyext --withmod-_cffi_backend --withmod-_rawffi --withmod-signal -c "import sys; sys.path.append('/tmp/numpy'); import numpy as np"
pypy startup is about 35 secs
@mattip
mattip / fix windows update failure in a VM
Created September 23, 2016 13:03
Need to set exceptions for netowrking in order to enable windows updates after switching a VM's network card
http://www.sevenforums.com/windows-updates-activation/159323-code-8024402f-windows-update.html
@mattip
mattip / gist:d989b1e21a7432f97ec2011ab0074708
Last active May 12, 2017 06:24
compare test runs win32 to linux
Windows, test run requires __580__ seconds
> python pytest.py rpython\translator\c\test\test_typed.py --duration=10
[platform:msg] Set platform with 'host' cc=None, using cc='cl.exe', version=90
============================= test session starts =============================
platform win32 -- Python 2.7.13, pytest-2.9.2, py-1.4.29, pluggy-0.3.1
pytest-2.9.2 from D:\pypy_stuff\pypy\pytest.pyc
rootdir: D:\pypy_stuff\pypy\rpython, inifile: pytest.ini
plugins: profiling-1.2.6
collected 71 items
@mattip
mattip / gist:9b39ded038d3c3f4a344bcb03d675b3b
Last active July 7, 2017 15:04
pandas tests failures 9.7.2017
With pandas HEAD, numpy refactor-updateifcopy, pypy cpyext-add_newdoc:
$(ulimit -v 5000000; p=../pypy-latest/bin/pypy; export PYTHONHASHSEED=$($p -c 'import random; print(random.randint(1, 4294967295))'); $p -mpytest pandas -n 4)
bottom line, four xdist tests in parallel
267 failed, 9087 passed, 1631 skipped, 6 xfailed in 1036.08 seconds
$ grep -a '\(^E *[A-Z][a-zA-Z]*Error:\)\|\(^AssertionError$\)\|\(^E *MemoryError\)' ../test_pandas.txt |cut -c 5- |cut -f1,2 -d: | sed -e's/ */ /' | sort |uniq -c |sort -n -r
58 TypeError: don't know how to convert scalar number to int
54 ValueError: setting an array element with a sequence.
@mattip
mattip / gist:83304fc4977f8174c227ba9631ffd82a
Last active June 1, 2017 21:44
numpy test failures 26.5.17
$ ../pypy-latest/bin/pypy runtests.py
Building, see build.log...
Build OK
Running unit tests for numpy
NumPy version 1.14.0.dev0+f6822b4
NumPy relaxed strides checking option: True
NumPy is installed in /home/matti/pypy_stuff/numpy/build/testenv/site-packages/numpy
Python version 2.7.13 (5e7bef99e9f5, May 31 2017, 22:00:12)[PyPy 5.9.0-alpha0 with GCC 6.2.0 20160901]
nose version 1.3.7
############ lambda: a: math.degrees #############
debug-capi:Python C/API function _test_ext_module_5403.t(fun,fun_extra_args=())
debug-capi:int a=:output,hidden,scalar
debug-capi:a=0
debug-capi:fun=>cb_fun_in_t__user__routines:input,required,callback
debug-capi:create_cb_arglist
debug-capi:create_cb_arglist:maxnofargs(-nofoptargs),tot,opt,ext,siz,nofargs=0(-0),1,0,1,1,0
debug-capi:create_cb_arglist-end
debug-capi:Assuming 0 arguments; at most 0(-0) is expected.
debug-capi:for fun=NULL
@mattip
mattip / test_memory.py
Created July 14, 2017 08:56
memory "leak" in cpyext
running with "pypy test_memory 10" -> 77 MB retained when using range()
running with "cpython test_memory 10" -> 0.6 MB retained when using range()
@mattip
mattip / sorted tests - 10 missing?
Created August 9, 2017 18:56
pandas failures, pandas HEAD (3e9e947b8), numpy branch refactor-updateifcopy2, pypy
grep -a '\(^E *[A-Z][a-zA-Z]*Error:\)\|\(^AssertionError$\)\|\(^E *MemoryError\)' ../test_pandas.txt |cut -c 5- |cut -f1,2 -d: | sed -e's/ */ /' | sort |uniq -c |sort -n -r
20 TypeError: sys.getsizeof() is not implemented on PyPy.
8 SystemError: An exception was set, but function returned a value
6 AssertionError: Attributes are different
4 SystemError: Bad internal call!
4 AttributeError: 'str' object has no attribute '__sizeof__'
4 AssertionError: numpy array are different
3 PicklingError: Can't pickle <type 'pandas._libs.sparse.BlockIndex'>
2 SettingWithCopyError:
2 OperationalError: database table is locked
@mattip
mattip / sorted test failures
Created August 27, 2017 19:41
pandas failures 27.9.17
$ grep -a '\(^E *[A-Z][a-zA-Z]*Error:\)\|\(^E *AssertionError$\)\|\(^E *MemoryError\)\|\(^E *Bad\)\|\(^E *Failed:\)' ../test_pandas.txt |cut -c 5- |cut -f1,2 -d: | sed -e's/ */ /' | sort |uniq -c |sort -n -r
2 OperationalError: database table is locked
2 Failed: DID NOT RAISE <type 'exceptions.Exception'>
2 BadZipfile: File is not a zip file
1 ValueError: ('year must be in 1..9999', 0)
1 TypeError: expected a readable buffer object
1 SettingWithCopyError:
1 BadMove: testing
1 BadMove: test
1 AssertionError: TypeError not raised.