-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #348 from brainglobe/slow-tests
Remove the markers to disable specific slowly running tests
- Loading branch information
Showing
9 changed files
with
69 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
from examples import ( | ||
add_cells, | ||
add_cylinder, | ||
add_labels, | ||
add_mesh_from_file, | ||
add_cylinder, | ||
animation, | ||
brain_regions, | ||
brainglobe_atlases, | ||
cell_density, | ||
custom_camera, | ||
gene_expression, | ||
line, | ||
neurons, | ||
probe_tracks, | ||
ruler, | ||
screenshot, | ||
settings, | ||
slice, | ||
# streamlines, | ||
user_volumetric_data, | ||
video, | ||
volumetric_data, | ||
web_export, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,5 @@ | ||
import pytest | ||
|
||
from brainrender import settings | ||
|
||
settings.INTERACTIVE = False | ||
|
||
|
||
@pytest.mark.slow | ||
@pytest.mark.local | ||
def test_examples(): | ||
import examples | ||
|
||
examples.add_cells | ||
examples.add_mesh_from_file | ||
examples.animation | ||
examples.brain_regions | ||
examples.brainglobe_atlases | ||
examples.cell_density | ||
examples.custom_camera | ||
examples.gene_expression | ||
examples.neurons | ||
examples.ruler | ||
examples.settings | ||
examples.slice | ||
# examples.streamlines | ||
examples.user_volumetric_data | ||
examples.video | ||
examples.volumetric_data | ||
""" | ||
Run every script in the examples directory | ||
""" | ||
import examples # noqa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,33 @@ | ||
import pandas as pd | ||
import pytest | ||
|
||
from brainrender import Scene | ||
from brainrender.actors.streamlines import ( | ||
Streamlines, | ||
make_streamlines, | ||
) | ||
from brainrender.atlas_specific import get_streamlines_for_region | ||
|
||
|
||
@pytest.mark.local | ||
def test_download(): | ||
streams = get_streamlines_for_region("TH", force_download=False) | ||
assert len(streams) == 54 | ||
assert isinstance(streams[0], pd.DataFrame) | ||
|
||
|
||
@pytest.mark.local | ||
@pytest.mark.slow | ||
def test_download_slow(): | ||
streams = get_streamlines_for_region("TH", force_download=True) | ||
assert len(streams) == 54 | ||
assert isinstance(streams[0], pd.DataFrame) | ||
|
||
|
||
@pytest.mark.local | ||
def test_streamlines(): | ||
s = Scene(title="BR") | ||
streams = get_streamlines_for_region("TH", force_download=False) | ||
s.add(Streamlines(streams[0])) | ||
s.add(*make_streamlines(*streams[1:3])) | ||
|
||
with pytest.raises(TypeError): | ||
Streamlines([1, 2, 3]) | ||
|
||
# s.render(interactive=False) | ||
del s | ||
# import pandas as pd | ||
# import pytest | ||
# | ||
# from brainrender import Scene | ||
# from brainrender.actors.streamlines import ( | ||
# Streamlines, | ||
# make_streamlines, | ||
# ) | ||
# from brainrender.atlas_specific import get_streamlines_for_region | ||
# | ||
# | ||
# def test_download(): | ||
# streams = get_streamlines_for_region("TH", force_download=False) | ||
# assert len(streams) == 54 | ||
# assert isinstance(streams[0], pd.DataFrame) | ||
# | ||
# | ||
# def test_download_slow(): | ||
# streams = get_streamlines_for_region("TH", force_download=True) | ||
# assert len(streams) == 54 | ||
# assert isinstance(streams[0], pd.DataFrame) | ||
# | ||
# | ||
# def test_streamlines(): | ||
# s = Scene(title="BR") | ||
# streams = get_streamlines_for_region("TH", force_download=False) | ||
# s.add(Streamlines(streams[0])) | ||
# s.add(*make_streamlines(*streams[1:3])) | ||
# | ||
# with pytest.raises(TypeError): | ||
# Streamlines([1, 2, 3]) | ||
# | ||
# del s |