def test_reformat_comment(self):
     Equal = self.assertEqual
     test_string = '    """this is a test of a reformat for a triple quoted string will it reformat to less than 70 characters for me?"""'
     result = fp.reformat_comment(test_string, 70, '    ')
     expected = '    """this is a test of a reformat for a triple quoted string will it\n    reformat to less than 70 characters for me?"""'
     Equal(result, expected)
     test_comment = '# this is a test of a reformat for a triple quoted string will it reformat to less than 70 characters for me?'
     result = fp.reformat_comment(test_comment, 70, '#')
     expected = '# this is a test of a reformat for a triple quoted string will it\n# reformat to less than 70 characters for me?'
     Equal(result, expected)
Esempio n. 2
0
 def test_reformat_comment(self):
     Equal = self.assertEqual
     test_string = '    """this is a test of a reformat for a triple quoted string will it reformat to less than 70 characters for me?"""'
     result = fp.reformat_comment(test_string, 70, '    ')
     expected = '    """this is a test of a reformat for a triple quoted string will it\n    reformat to less than 70 characters for me?"""'
     Equal(result, expected)
     test_comment = '# this is a test of a reformat for a triple quoted string will it reformat to less than 70 characters for me?'
     result = fp.reformat_comment(test_comment, 70, '#')
     expected = '# this is a test of a reformat for a triple quoted string will it\n# reformat to less than 70 characters for me?'
     Equal(result, expected)
    def test_reformat_comment(self):
        Equal = self.assertEqual

        # reformat_comment formats to a minimum of 20 characters
        test_string = (
            "    \"\"\"this is a test of a reformat for a triple quoted string"
            " will it reformat to less than 70 characters for me?\"\"\"")
        result = fp.reformat_comment(test_string, 70, "    ")
        expected = (
            "    \"\"\"this is a test of a reformat for a triple quoted string will it\n"
            "    reformat to less than 70 characters for me?\"\"\"")
        Equal(result, expected)

        test_comment = (
            "# this is a test of a reformat for a triple quoted string will "
            "it reformat to less than 70 characters for me?")
        result = fp.reformat_comment(test_comment, 70, "#")
        expected = (
            "# this is a test of a reformat for a triple quoted string will it\n"
            "# reformat to less than 70 characters for me?")
        Equal(result, expected)
Esempio n. 4
0
    def test_reformat_comment(self):
        Equal = self.assertEqual

        # reformat_comment formats to a minimum of 20 characters
        test_string = (
            "    \"\"\"this is a test of a reformat for a triple quoted string"
            " will it reformat to less than 70 characters for me?\"\"\"")
        result = fp.reformat_comment(test_string, 70, "    ")
        expected = (
            "    \"\"\"this is a test of a reformat for a triple quoted string will it\n"
            "    reformat to less than 70 characters for me?\"\"\"")
        Equal(result, expected)

        test_comment = (
            "# this is a test of a reformat for a triple quoted string will "
            "it reformat to less than 70 characters for me?")
        result = fp.reformat_comment(test_comment, 70, "#")
        expected = (
            "# this is a test of a reformat for a triple quoted string will it\n"
            "# reformat to less than 70 characters for me?")
        Equal(result, expected)