File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ def run(arguments):
154154def download_icon_font (icon_font , directory ):
155155 try :
156156 return AVAILABLE_ICON_FONTS [icon_font ]['downloader' ](directory )
157- except KeyError :
157+ except KeyError : # pragma: no cover
158158 raise Exception ("We don't support downloading font '{name}'" .format (
159159 name = icon_font )
160160 )
Original file line number Diff line number Diff line change @@ -21,13 +21,11 @@ class IconFontDownloader(with_metaclass(ABCMeta)):
2121 @abstractmethod
2222 def css_url (self ):
2323 """Icon font CSS file URL"""
24- pass
2524
2625 @property
2726 @abstractmethod
2827 def ttf_url (self ):
2928 """Icon font TTF file URL"""
30- pass
3129
3230 def __init__ (self , directory = None ):
3331 """
@@ -64,7 +62,6 @@ def _get_latest_tag_from_github(repo_api_url):
6462 @abstractmethod
6563 def get_latest_version_number (self ):
6664 """Get latest icon font version number"""
67- pass
6865
6966 def download_css (self , directory ):
7067 """Downloads icon font CSS file and returns its path"""
Original file line number Diff line number Diff line change @@ -47,6 +47,15 @@ def test_icon_export(capfd):
4747 css_file = os .path .join ('files' , 'font-awesome.css' )
4848 ttf_file = os .path .join ('files' , 'fontawesome-webfont.ttf' )
4949
50+ # Export none icons
51+ with pytest .raises (SystemExit ):
52+ command_line .run (
53+ '--css {css_file} --ttf {ttf_file}' .format (
54+ css_file = css_file , ttf_file = ttf_file
55+ ).split ()
56+ )
57+ out , err = capfd .readouterr () # For skipping stdout
58+
5059 # Export one icon
5160 command_line .run (
5261 '--css {css_file} --ttf {ttf_file} github' .format (
You can’t perform that action at this time.
0 commit comments