<commit_before>r"""
Tests for QtAwesome.
"""
# Standard library imports
import sys
import subprocess

# Test Library imports
import pytest

# Local imports
import qtawesome as qta
from qtawesome.iconic_font import IconicFont
from PyQt5.QtWidgets import QApplication


def test_segfault_import():
    output_number = subprocess.call('python -c "import qtawesome '
                                    '; qtawesome.icon()"', shell=True)
    assert output_number == 0


def test_unique_font_family_name():
    """
    Test that each font used by qtawesome has a unique name.
<commit_msg>Add more details in the test docstring.<commit_after>r"""
Tests for QtAwesome.
"""
# Standard library imports
import sys
import subprocess

# Test Library imports
import pytest

# Local imports
import qtawesome as qta
from qtawesome.iconic_font import IconicFont
from PyQt5.QtWidgets import QApplication


def test_segfault_import():
    output_number = subprocess.call('python -c "import qtawesome '
                                    '; qtawesome.icon()"', shell=True)
    assert output_number == 0


def test_unique_font_family_name():
    """
    Test that each font used by qtawesome has a unique name. If this test
    fails, this probably means that you need to rename the family name of
    some fonts. Please see PR #98 for more details on why it is necessary and
    on how to do this.

{'fraction_non_alphanumeric': 0.06739130434782609, 'fraction_numerical': 0.004347826086956522, 'mean_word_length': 3.3702531645569622, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4419893', 'n_tokens_mistral': 415, 'n_tokens_neox': 398, 'n_words': 152}