@@ -54,6 +54,7 @@ def test_by_hand(tmpdir):
5454
5555
5656def test_from_genbank (tmpdir ):
57+ pytest .importorskip ('Bio' )
5758 graphic_record = BiopythonTranslator ().translate_record (example_genbank )
5859 assert len (graphic_record .features ) == 11
5960 ax , _ = graphic_record .plot (figure_width = 10 )
@@ -63,13 +64,15 @@ def test_from_genbank(tmpdir):
6364
6465
6566def test_from_record (tmpdir ):
67+ pytest .importorskip ('Bio' )
6668 record = load_record (example_genbank )
6769 annotate_biopython_record (record , label = "bla" , color = "blue" )
6870 graphic_record = BiopythonTranslator ().translate_record (record )
6971 assert len (graphic_record .features ) == 12
7072
7173
7274def test_from_genbank_to_circular (tmpdir ):
75+ pytest .importorskip ('Bio' )
7376 translator = BiopythonTranslator ()
7477 graphic_record = translator .translate_record (
7578 example_genbank , record_class = CircularGraphicRecord
@@ -202,6 +205,7 @@ def test_cropping_on_the_edge():
202205
203206
204207def test_to_biopython_record ():
208+ pytest .importorskip ('Bio' )
205209 record = GraphicRecord (
206210 sequence_length = 50 ,
207211 features = [
@@ -239,6 +243,7 @@ def test_sequence_and_translation_plotting():
239243
240244
241245def test_BlackBoxlessLabelTranslator (tmpdir ):
246+ pytest .importorskip ('Bio' )
242247 translator = BlackBoxlessLabelTranslator ()
243248 graphic_record = translator .translate_record (example_genbank )
244249 assert len (graphic_record .features ) == 11
@@ -256,7 +261,7 @@ def test_gff():
256261
257262
258263def test_multiline_plot ():
259-
264+ pytest . importorskip ( 'Bio' )
260265 translator = BiopythonTranslator ()
261266 graphic_record = translator .translate_record (example_genbank )
262267 subrecord = graphic_record .crop ((1700 , 2200 ))
@@ -267,6 +272,7 @@ def test_multiline_plot():
267272
268273
269274def test_multipage_plot (tmpdir ):
275+ pytest .importorskip ('Bio' )
270276 translator = BiopythonTranslator ()
271277 graphic_record = translator .translate_record (example_genbank )
272278 subrecord = graphic_record .crop ((1800 , 2750 ))
@@ -279,6 +285,7 @@ def test_multipage_plot(tmpdir):
279285
280286
281287def test_multipage_plot_with_translation (tmpdir ):
288+ pytest .importorskip ('Bio' )
282289 # Github issue 61
283290 translator = BiopythonTranslator ()
284291 graphic_record = translator .translate_record (example_genbank )
@@ -298,6 +305,7 @@ def test_multipage_plot_with_translation(tmpdir):
298305
299306
300307def test_legend ():
308+ pytest .importorskip ('Bio' )
301309 class CustomTranslator (BiopythonTranslator ):
302310 def compute_feature_legend_text (self , feature ):
303311 return feature .type
0 commit comments