Skip to content
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

Mark tests that are expected to fail with xfail rather than just not running them #367

Merged
merged 2 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ brainrender/atlas_specific/gene_expression/__pycache__/*
brainrender/atlas_specific/__pycache__

example_brainrender_shot*

brain_regions.html
workspace.py
workspace.ipynb
brexport.html
Expand Down
69 changes: 36 additions & 33 deletions tests/test_streamlines.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
# 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
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.xfail(reason="Likely due to fail due to neuromorpho")
def test_download():
streams = get_streamlines_for_region("TH", force_download=False)
assert len(streams) == 54
assert isinstance(streams[0], pd.DataFrame)


@pytest.mark.xfail(reason="Likely due to fail due to neuromorpho")
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.xfail(reason="Likely due to fail due to neuromorpho")
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
Loading