<commit_before>from .. utils import TranspileTestCase, UnaryOperationTestCase, BinaryOperationTestCase, InplaceOperationTestCase


class StrTests(TranspileTestCase):
    def test_setattr(self):
        self.assertCodeExecution("""
            x = "Hello, world"
            try:
                x.attr = 42
            except AttributeError as err:
                print(err)
            """)

    def test_iscase(self):
        self.assertCodeExecution("""
            for s in ['hello, World!', 'HELLO, WORLD.', 'ello? world', '']:
                print(s.islower())
                print(s.isupper())
            """)

    def test_isdigit(self):
        self.assertCodeExecution("""
            for s in ['112358132134', '3.14159', '12312344df', '']:
                print(s.isdigit())
            """)

    def test_isspace(self):
        self.assertCodeExecution("""
            for s in ['''  \t \r''', ' ', '\t\tnope\t\t', '']:
                print(s.isspace())
            """)

    def test_isalpha(self):
        self.assertCodeExecution("""
            for s in ['Hello World', 'hello wORLd.', 'Hello world.', '', 'hello1'
            'this', 'this is string example....wow!!!', 'átomo', 'CasesLikeTheseWithoutSpaces']:
                print(s.isalpha())
            """)<commit_msg>Resolved minor issue (typo)<commit_after>from .. utils import TranspileTestCase, UnaryOperationTestCase, BinaryOperationTestCase, InplaceOperationTestCase


class StrTests(TranspileTestCase):
    def test_setattr(self):
        self.assertCodeExecution("""
            x = "Hello, world"
            try:
                x.attr = 42
            except AttributeError as err:
                print(err)
            """)

    def test_iscase(self):
        self.assertCodeExecution("""
            for s in ['hello, World!', 'HELLO, WORLD.', 'ello? world', '']:
                print(s.islower())
                print(s.isupper())
            """)

    def test_isdigit(self):
        self.assertCodeExecution("""
            for s in ['112358132134', '3.14159', '12312344df', '']:
                print(s.isdigit())
            """)

    def test_isspace(self):
        self.assertCodeExecution("""
            for s in ['''  \t \r''', ' ', '\t\tnope\t\t', '']:
                print(s.isspace())
            """)

    def test_isalpha(self):
        self.assertCodeExecution("""
            for s in ['Hello World', 'hello wORLd.', 'Hello world.', '', 'hello1',
            'this', 'this is string example....wow!!!', 'átomo', 'CasesLikeTheseWithoutSpaces']:
                print(s.isalpha())
            """)
{'fraction_non_alphanumeric': 0.15535097813578827, 'fraction_numerical': 0.022247794399693134, 'mean_word_length': 1.8596491228070176, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7291697', 'n_tokens_mistral': 820, 'n_tokens_neox': 744, 'n_words': 159}