Hi Matti!

Matti Picus schrieb am 24.11.2016 um 06:48:
> I am trying to get cython to work better with PyPy. I am sort of documenting 
> my 
> progress and failures at 
> https://bitbucket.org/pypy/pypy/wiki/edit/cpyext_2_-_cython

Thanks for working on that.


> So far I can run the test suite on a nightly PyPy2 
> http://buildbot.pypy.org/nightly/trunk, but only when using --no-refnanny. On 
> the missing-tp_new branch of PyPy (trying to fix the datetime problems), 
> running 
> only the c backend I get something like
> 
> Ran 4632 tests in 931.486s FAILED (failures=80, errors=18, skipped=1)
> 
> This mail is a heads-up, I will hopefully issue some pull requests soon. 
> Also, I 
> have some questions, mainly about the test runner:
> 
> - Shouldn't the "skipped" field include the number of tests in pypy_bugs.txt?

That would be nice, yes, but it still wouldn't count entirely right,
because it could only count the test files, not the number of tests inside
of such a file, which it can't know without compiling the file first.


> - How can I get pdb to work during a single test run to try to work out the 
> internals of cython? In nose or pytest I can add the -s option, I could not 
> find 
> an equivalent.

Difficult. The Python debugger doesn't play very nicely with Cython code,
because it cannot step through compiled code, look at C variables, etc.

If you only care about Cython itself, I'd use the normal "pdb.set_trace()"
pattern. You wouldn't want to step through all of the compiler pipeline
anyway, as it involves a lot of deep, generic syntax tree traversal code.

To figure out the internals, you might find some hints here:

https://github.com/cython/cython/wiki/HackerGuide

It's a bit oldish, but not really outdated.


> - Is there a marker for test start/test stop in the test report? I would like 
> to 
> use awk or grep to try to analyse the multiple failures into groups

Tests start with "runTest [something]", but there's not end marker.


> - The XML backend seems to miss some of the stdout/stderr messages. Is there 
> more documentation of test running options somewhere?

I'm sure you've found "--help", but I don't think there's more than that. I
agree that the XML test output is suboptimal, but haven't looked into it
any recently. It's certainly fixable.

Stefan

_______________________________________________
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel

Reply via email to