bhmm / legacy-bhmm-force-spectroscopy-manuscript

Bayesian hidden Markov models for analysis of single-molecule trajectory data
GNU Lesser General Public License v3.0
2 stars 3 forks source link

[conda-bld] chdir to install location, since nosetests operates on dirs #20

Closed marscher closed 9 years ago

marscher commented 9 years ago

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.

franknoe commented 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

— 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

Mail: Arnimallee 6, 14195 Berlin, Germany

jchodera commented 9 years ago

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)

jchodera commented 9 years ago

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.

jchodera commented 9 years ago

Closing, as this should be addressed by elimination of relative imports in #21