Closed coldfix closed 10 years ago
I think, that it's probably better to rename the constructor functions rather than the submodules. I attached a small PR to this issue.
Do you have any idea, why this test fails? It runs fine on all other machines, on Travis and on my local machine in all python{2.6,2.7.3.3} and pypy.
For me it looks like the files of the cpymadfolder have not been updated.
Or maybe a more likely explanation: there is an installed version of pymad on the machine which prevents the local files from being imported. I imagine this can happen if relying on custom PYTHONPATH extensions rather than using a virtualenv.
This is my work desktop, which in principle I don't have access to anymore (as soon as a new employee takes over this machine). You can safely ignore the tests from that machine from now on. I think as well that it most likely picks up an installed pymad instead of testing the new one.
I just realized that the name clash of package variables and module names in cern.cpymad has some unpleasant consequences:
I also suspect that this name clash is the reason for various import problems I had in the past (c.f. 459897b). Note, that the behaviour changes, if the submodule is first imported after the package variable is defined (it will be overwritten, then).
The only way to fix is, is to either rename the
.madx
module or the variablemadx
inside thecern.cpymad
package. Both of these are not fully backward compatible.