From: Ole Streicher <olebole@debian.org>
Date: Thu, 5 Dec 2019 13:59:36 +0100
Subject: Copy from conftest.py to get small_tree fixture

Check the pytest documentation, it *should* work from conftest.py as
well, but it doesn't. No idea why.
---
 asdf/tests/test_api.py          | 7 +++++++
 asdf/tests/test_array_blocks.py | 6 ++++++
 asdf/tests/test_file_format.py  | 6 ++++++
 asdf/tests/test_generic_io.py   | 4 ++++
 4 files changed, 23 insertions(+)

diff --git a/asdf/tests/test_api.py b/asdf/tests/test_api.py
index 2660ffa..e8cf124 100644
--- a/asdf/tests/test_api.py
+++ b/asdf/tests/test_api.py
@@ -17,6 +17,13 @@ from asdf.extension import ExtensionProxy
 
 from .helpers import assert_no_warnings, assert_roundtrip_tree, assert_tree_match, yaml_to_asdf
 
+from . import create_small_tree
+
+
+@pytest.fixture
+def small_tree():
+    return create_small_tree()
+
 
 def test_get_data_from_closed_file(tmp_path):
     path = str(tmp_path / "test.asdf")
diff --git a/asdf/tests/test_array_blocks.py b/asdf/tests/test_array_blocks.py
index 2783350..9627f6a 100644
--- a/asdf/tests/test_array_blocks.py
+++ b/asdf/tests/test_array_blocks.py
@@ -8,6 +8,12 @@ from numpy.testing import assert_array_equal
 
 import asdf
 from asdf import block, constants, generic_io
+from . import create_small_tree
+
+
+@pytest.fixture
+def small_tree():
+    return create_small_tree()
 
 
 def test_external_block(tmp_path):
diff --git a/asdf/tests/test_file_format.py b/asdf/tests/test_file_format.py
index 9709747..7209b82 100644
--- a/asdf/tests/test_file_format.py
+++ b/asdf/tests/test_file_format.py
@@ -5,6 +5,12 @@ import pytest
 
 import asdf
 from asdf import generic_io
+from . import create_small_tree
+
+
+@pytest.fixture
+def small_tree():
+    return create_small_tree()
 
 
 def test_no_yaml_end_marker(tmp_path):
diff --git a/asdf/tests/test_generic_io.py b/asdf/tests/test_generic_io.py
index a54e095..9af491c 100644
--- a/asdf/tests/test_generic_io.py
+++ b/asdf/tests/test_generic_io.py
@@ -13,6 +13,10 @@ from asdf.config import config_context
 
 from . import create_large_tree, create_small_tree, helpers
 
+@pytest.fixture
+def small_tree():
+    return create_small_tree()
+
 
 @pytest.fixture(params=[create_small_tree, create_large_tree])
 def tree(request):
