Closed wd15 closed 3 months ago
It is definitely using the updated version of fipy/tests/doctestPlus.py
as it prints on at the top of the file and prints to the locally cloned version. Installing with pip install
won't work as Nix doesn't allow this for obvious reasons. Although it's using the cloned version of fipy/tests/doctestPlus.py
, it is never failing with the raise Exception
in the testmod
function. What is going on?
Ok, although fipy/tests/doctestPlus.py
is imported, the debugging version of fipy/tests/test.py
is never imported. Why is that?
Other than when fipy uses fipy.test()
, fipy.tests.test
is never imported in the fipy source. It's handed over to setup.py which knows what to do. It's from this file that we're not getting the debugging info that we should be printing and thus the change in the way numpy operates.
Let me do some experiments
Oh! Building the egg info actually made it use the modified test module.
Oh! Building the egg info actually made it use the modified test module.
Yes. Turns out it isn't a nix thing, per se. Fresh checkout, without building egg_info, doesn't execute the relevant tweaks to printoptions
. After building egg_info, for any reason, all is OK.
Still not right for this particular Action; it doesn't appear to be running the tests after it builds egg_info. I'll leave that to you.
Oh! Building the egg info actually made it use the modified test module.
Yes. Turns out it isn't a nix thing, per se. Fresh checkout, without building egg_info, doesn't execute the relevant tweaks to
printoptions
. After building egg_info, for any reason, all is OK.Still not right for this particular Action; it doesn't appear to be running the tests after it builds egg_info. I'll leave that to you.
Very good. Will get this cleaned up.
Just one failure now, which also occurs locally as well. Some sort of reordering error with Scipy / Numpy interaction.
@wd15: Having tried a bunch of diagnostics and getting nothing to show up in the nix tests, I think what's happening is that:
nix develop --command bash -c "python setup.py test 2> test.out" || true
runs the fipy tests in the source directory, but when the testsimport fipy
, they don't import from the source directory, they import thefipy
that's already installed.This would explain why we see changes in the doctests (because it's extracting those from the source code), but we don't see changes to the code (because it's running the code that's already installed).
My naive attempt to do something about that (2dd8321) results in
I don't (want to) understand nix well enough to work around that.