Commit fc2c750 1 parent 9d8f506 commit fc2c750 Copy full SHA for fc2c750
File tree 1 file changed +25
-1
lines changed
1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 7
7
# Test Library imports
8
8
import pytest
9
9
10
+ # Local imports
11
+ import qtawesome as qta
12
+ from qtawesome .iconic_font import IconicFont
13
+
14
+
10
15
def test_segfault_import ():
11
16
output_number = subprocess .call ('python -c "import qtawesome '
12
17
'; qtawesome.icon()"' , shell = True )
13
18
assert output_number == 0
14
-
19
+
20
+
21
+ def test_unique_font_family_name (qtbot ):
22
+ """
23
+ Test that each font used by qtawesome has a unique name.
24
+
25
+ Regression test for Issue #107
26
+ """
27
+ resource = qta ._instance ()
28
+ assert isinstance (resource , IconicFont )
29
+
30
+ prefixes = list (resource .fontname .keys ())
31
+ assert prefixes
32
+
33
+ fontnames = set (resource .fontname .values ())
34
+ assert fontnames
35
+
36
+ assert len (prefixes ) == len (fontnames )
37
+
38
+
15
39
if __name__ == "__main__" :
16
40
pytest .main ()
You can’t perform that action at this time.
0 commit comments