-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run the tests? #35
Comments
The tests can be run by executing pytest from the project root directory. The tests should run successfully after the project and the additional dependencies are installed. I upgraded my pytest and pytest-cov to the latest versions to match your environment and I was unable to reproduce the error you see. However, when I then installed pytest-qt 2.3.1 the error came up. I'd recommend either upgrading pytest-qt to the latest version or unistalling it. |
To run the tests you will also need the .merlinenv file located in your user home directed to specify the paths to the analysis results, data, and the parameters. For the tests these directories can be empty. I need to update the documentation since the documentation still specifies that this should be .env. You can create the .merlinenv file using the command (including the . at the end): merlin --configure . |
Thanks for the help, it is mostly working now except for
|
This issue seems to come from shapely commit f1a5a3f28a where they use an if statement to determine if coordinates is null, which doesn't work for numpy arrays. I'd suggest rolling back shapely to 1.6.4.post2 and I'll ask them to change this in shapely. The second error might come from it failing to clean up properly after the first task fails, but if it persists I can look into it too. |
Do you know what might get left behind? I assumed it was a HDF5 file so I searched the project directory for |
Is it narrowed down to this one failed test now? All the temporary test files are saved within subdirectories of the test folder, so if you delete everything in the folder that was not part of the git repository it should delete anything that might have been left behind. The previous test asserts that the spatial feature database is empty so if test_feature_hdf5_db_read_write_delete_one_fov is passing it could be a different problem. The spatial features are saved into a file with .hdf5 extension. Can you list the modules you have installed? I'm particularly interested in the version of h5py and pytables. |
Okay I didn't read what you wrote carefully enough. It does look like the second test failure is due to the shapely failure. I haven't tried the shapely version you suggested yet, I thought I might pass over that for now and just address the second failure but that doesn't look possible. I have |
When I looked into the shapely source code it looked like the line that is causing the problem is new in 1.7a2. I'll update the merlin requirements.txt file to indicate that shapely version 1.7a2 shouldn't be used with merlin so that other users can avoid this problem. |
All the tests are passing now using |
It isn't clear what needs to be done to get the tests to run. Do I need to do anything beyond installing the project and all it's dependencies?
Also every test is failing with the following:
`
______________ ERROR at teardown of test_remove_overlapping_cells ______________
item =
../../../pyenv/mydev/lib/python3.6/site-packages/pytestqt/plugin.py:156:
item =
E AttributeError: 'Function' object has no attribute 'get_marker'
../../../pyenv/mydev/lib/python3.6/site-packages/pytestqt/exceptions.py:81: AttributeError
`
Which I think is actually an issue with pytest or pytest-cov. Is
pytest
the recommended way to run the tests?`
$ pip list | grep pytest
pytest 5.3.1
pytest-cov 2.8.1
pytest-faulthandler 1.5.0
pytest-forked 0.2
pytest-mock 1.10.0
pytest-qt 2.3.1
pytest-remotedata 0.3.2
`
The text was updated successfully, but these errors were encountered: