Closed marscher closed 9 years ago
Please don't merge yet. Still testing this.
Am 05/05/15 um 18:13 schrieb Martin K. Scherer:
marscher wants to merge 1 commit into bhmm:master from marscher:fix_conda_build_nosetests:
This fixes the ImportError which showed up in #18 https://github.com/bhmm/bhmm/issues/18. The background of this is, that nosetests either expects a file or a directory to search for test units, but during conda-build the command gets executed in the wrong place. Since one can not reproduce #18 https://github.com/bhmm/bhmm/issues/18 in normal environments (eg. python shell) this is cleary a nose issue.
The fix is to chdir relative to the test installation, so nose can find the desired directory.
You can view, comment on, or merge this pull request online at:
https://github.com/bhmm/bhmm/pull/20
Commit Summary
[conda-bld] chdir to install location, since nosetests operates on dirs/files.
File Changes
- M devtools/conda-recipe/meta.yaml https://github.com/bhmm/bhmm/pull/20/files#diff-0 (4)
A devtools/conda-recipe/run_test.py https://github.com/bhmm/bhmm/pull/20/files#diff-1 (12)
Patch Links:
- https://github.com/bhmm/bhmm/pull/20.patch
- https://github.com/bhmm/bhmm/pull/20.diff
— Reply to this email directly or view it on GitHub https://github.com/bhmm/bhmm/pull/20.
Prof. Dr. Frank Noe Head of Computational Molecular Biology group Freie Universitaet Berlin
Phone: (+49) (0)30 838 75354 Web: research.franknoe.de
I don't think this is the right kind of fix.
For our other projects, nosetests packagename
should import packagename
and run all the tests in it. I believe this was working before for bhmm
but somehow no longer works.
@kyleabeauchamp may have more insight into this issue (see #18)
See, for example, what we do with openmmtools
. Running nosetests openmmtools
will run all the nosetests in the package, provided you have openmmtools
installed, regardless of where you are in the filesystem.
Closing, as this should be addressed by elimination of relative imports in #21
This fixes the ImportError which showed up in #18. The background of this is, that nosetests either expects a file or a directory to search for test units, but during conda-build the command gets executed in the wrong place. Since one can not reproduce #18 in normal environments (eg. python shell) this is cleary a nose issue.
The fix is to chdir relative to the test installation, so nose can find the desired directory.