Skip to content

Commit

Permalink
Mark tests that are expected to fail with xfail rather than just no…
Browse files Browse the repository at this point in the history
…t running them (#367)

* update gitignore

* xfail tests rather than commenting out
  • Loading branch information
adamltyson authored Jun 7, 2024
1 parent f1e3785 commit 767f5d1
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 34 deletions.
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

0 comments on commit 767f5d1

Please sign in to comment.