Lisandro Dalcin wrote:
> See this...
> 
> $ find Cython -name 'Test*'
> Cython/TestUtils.py

This is a collection of utilities for writing tests, and is so not in 
the same category as the rest...

> Cython/Compiler/Tests
> Cython/Compiler/Tests/TestParseTreeTransforms.py
> Cython/Compiler/Tests/TestTreeFragment.py
> Cython/Compiler/Tests/TestBuffer.py
> Cython/Compiler/Tests/TestDecorators.py
> Cython/Tests
> Cython/Tests/TestCodeWriter.py
> 
> What do you think about moving ALL that inside "Cython/Tests"...

Why?

These are unit tests (and NOT integration tests, like tests/*). I think 
it is very uncommon to remove tests that far from the package they are 
testing. The idea is that the Cython.Compiler package has its unit tests 
in Cython.Compiler.Tests, and the Cython package has its unit tests in 
Cython.Tests.

(The reason it is very uncommon to do what you suggest is that they test 
1:1 with the file they refer to. What do you do with your scheme if both 
Cython/Foo.py and Cython/Compiler/Foo.py exists?)

If anything, I think all the test files should be moved alongside the 
other files; but since unit tests are so little in use that would be a 
bit intrusive..

Another common convention is to put the unit tests in the same script 
files as they are testing (perhaps as doctests), but that is


> BTW, Why setup.py lists  'Cython.Tests' and 'Cython.Compiler.Tests' as
> packages? Do a final user-targeted installation really need these?

I don't mind either way, but it's rather common for a Python package to 
package its test (e.g. with NumPy there's a method you can call to run 
the test suite). But in that case, tests/* would be much more important 
anyway, so removing these seems more consistent.

-- 
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to