<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import unittest

__ = False


class AboutStrings(unittest.TestCase):

    # Equivalent ways of creating string objects

    # These are also referred to as string literals
    # as they are literally short cuts for:
    # >>> str('a string')
    # 'a string'

    def test_double_quoted_strings_are_strings(self):

        string = "Hello, world."

        assert isinstance(string, str)

    def test_single_quoted_strings_are_also_strings(self):

        string = 'Goodbye, world.'

        assert isinstance(__, str)

    def test_use_single_quotes_to_create_string_with_double_quotes(self):

        string = 'He said, "Go Away."'

        assert __ == string

    def test_use_double_quotes_to_create_strings_with_single_quotes(self):

        string = "Don't"

        assert __ == string

    # String methods and operations

    def test_plus_concatenates_strings(self):

        string = "Hello, " + "world"

        assert __ == string
<commit_msg>string tests sorted<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import unittest

__ = False


class AboutStrings(unittest.TestCase):

    ###########################
    # Creating String Objects #
    ###########################

    # Also referred to as literals as they literally represent
    # objects of type str

    def test_double_quoted_strings_are_strings(self):

        string = "Hello, world."

        assert isinstance(__, str)

    def test_single_quoted_strings_are_also_strings(self):

        string = 'Goodbye, world.'

        assert isinstance(__, str)

    def test_use_backslash_to_escape_quotes_meant_for_string(self):

        string = "He said, \"Go Away.\""

        # create equivalent string object by using syntax from next test
        assert __ == string

    def test_use_single_quotes_to_create_string_with_double_quotes(self):

        string = 'He said, "Go Away."'

        # use '\' to create equivalent string object
        assert __ == string

    def test_use_double_quotes_to_create_strings_with_single_quotes(self):

        string = "Don't"

        # use '\' to create equivalent string object
        assert __ == string


    #################################
    # String methods and operations #
    #################################

    def test_plus_concatenates_strings(self):

        string = "Hello, " + "world"

        assert __ == string

{'fraction_non_alphanumeric': 0.13089864587607714, 'fraction_numerical': 0.0008206811653672548, 'mean_word_length': 2.964227642276423, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '623146', 'n_tokens_mistral': 730, 'n_tokens_neox': 671, 'n_words': 176}