1313# Module fixtures
1414@pytest .fixture (scope = 'module' )
1515def font_awesome ():
16+ """Create a IconFont instance from Font Awesome files"""
1617 css_file = os .path .join ('files' , 'font-awesome.css' )
1718 ttf_file = os .path .join ('files' , 'fontawesome-webfont.ttf' )
18- font = icon_font .IconFont (css_file = css_file , ttf_file = ttf_file )
19- return font
19+ return icon_font .IconFont (css_file = css_file , ttf_file = ttf_file )
2020
2121
2222# Tests
2323def test_init ():
2424 """Test initializing"""
25-
2625 # No arguments
2726 with pytest .raises (TypeError ):
2827 icon_font .IconFont ()
@@ -79,6 +78,7 @@ def test_size(font_awesome, image, size):
7978 ("rocket_123123.png" , '#123123' ),
8079])
8180def test_color (font_awesome , image , color ):
81+ """Test color option"""
8282 original_file = os .path .join ('files' , image )
8383
8484 font_awesome .export_icon (icon = 'rocket' , size = 16 , color = color )
@@ -97,6 +97,7 @@ def test_color(font_awesome, image, color):
9797 ("rocket_auto.png" , 'auto' ),
9898])
9999def test_scale (font_awesome , image , scale ):
100+ """Test scale option"""
100101 original_file = os .path .join ('files' , image )
101102
102103 font_awesome .export_icon (icon = 'rocket' , size = 16 , scale = scale )
@@ -110,7 +111,7 @@ def test_scale(font_awesome, image, scale):
110111
111112
112113# Teardown
113- def teardown_module (module ):
114+ def teardown_module ():
114115 """Delete exported icons directory"""
115116 if os .path .isdir ('exported' ):
116117 shutil .rmtree ('exported' )
0 commit comments