Skip to content

cannot run tests in local source directory due to non-standard directory structure #11

@avinson

Description

@avinson

Because the various probcomp repos utilize a src/ directory instead of a <MODULE_NAME>/ directory, tests cannot be run from within the repo directories themselves. Adding a symlink (e.g. ln -s src crosscat) fixes this issue but this workaround may have other side-effects. It would be preferable to update the directory structures. cc: @fsaad @zane @Schaechtle

$ make crosscat-test
====================================================================== test session starts =======================================================================
platform linux2 -- Python 2.7.11, pytest-2.8.5, py-1.5.2, pluggy-0.3.1
rootdir: /home/jovyan/crosscat, inifile:
collected 106 items

. ..........................................................................................................

=================================================================== 106 passed in 6.99 seconds ===================================================================
$ make crosscat-dev


Package plan for package removal in environment /opt/conda/envs/python2:

The following packages will be REMOVED:

    crosscat: 2017.12.05-0 probcomp/label/edge

$ make crosscat-test
====================================================================== test session starts =======================================================================
platform linux2 -- Python 2.7.11, pytest-2.8.5, py-1.5.2, pluggy-0.3.1
rootdir: /home/jovyan/crosscat, inifile:

================================================================== no tests ran in 0.05 seconds ==================================================================
ERROR: file or package not found: crosscat
make: *** [crosscat-test] Error 4

add symlink:

 2018-02-19 23:55:35 ⌚  avinson-notebook in ~/crosscat
○ → ln -s src crosscat

now fixed:

 $ make crosscat-test
====================================================================== test session starts =======================================================================
platform linux2 -- Python 2.7.11, pytest-2.8.5, py-1.5.2, pluggy-0.3.1
rootdir: /home/jovyan/crosscat, inifile:
collected 106 items

crosscat/tests/unit_tests/test_col_ensure.py .....................
crosscat/tests/unit_tests/test_continuous_component_model.py .....................
crosscat/tests/unit_tests/test_general_utils.py ...
crosscat/tests/unit_tests/test_multinomial_component_model.py .......................
crosscat/tests/unit_tests/test_pred_prob.py ....
crosscat/tests/unit_tests/test_quality_test_utils.py ...............
crosscat/tests/unit_tests/test_synthetic_data_generator.py ...................

=================================================================== 106 passed in 8.32 seconds ===================================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions