diff --git a/tests/test_export_html.py b/tests/test_export_html.py
index 4ac5cc4e..25f34d02 100644
--- a/tests/test_export_html.py
+++ b/tests/test_export_html.py
@@ -5,15 +5,19 @@
from brainrender import Scene
-@pytest.mark.local
-def test_export_for_web():
+@pytest.fixture
+def scene():
+ """Provide a scene with a brain region"""
s = Scene(title="BR")
-
th = s.add_brain_region("TH")
-
s.add_label(th, "TH")
+ return s
+
- path = s.export("test.html")
+@pytest.mark.local
+def test_export_for_web(scene):
+ """Check that exporting to html creates the expected file"""
+ path = scene.export("test.html")
assert path == "test.html"
path = Path(path)
@@ -21,5 +25,9 @@ def test_export_for_web():
path.unlink()
+
+@pytest.mark.local
+def test_export_for_web_raises(scene):
+ """Check that exporting with invalid file extention raises ValueError"""
with pytest.raises(ValueError):
- path = s.export("test.py")
+ scene.export("test.py")