Skip to content

Formatter breaks program/test elements via indentation changes #1253

Description

@ascholerChemeketa

The contents of program/tests is not on the exclusion list for the formatter.

This:

      <tests>
              from unittest.gui import TestCaseGui

              class myTests(TestCaseGui):
                  def testOne(self):
                      self.assertNotIn("False", self.getOutput(), "Testing that you have no False's.")
                      self.assertNotIn("True", self.getEditorText(), "Testing that you didn't hardcode the answer.")
                      self.assertRegex(self.getOutput(), r"(True[\s\n]*){5}", "Testing that you produced 5 True's.")

              myTests().main()
      </tests>

Getsthe first line deindented to:


      <tests>
         from unittest.gui import TestCaseGui

              class myTests(TestCaseGui):
                  def testOne(self):
                      self.assertNotIn("False", self.getOutput(), "Testing that you have no False's.")
                      self.assertNotIn("True", self.getEditorText(), "Testing that you didn't hardcode the answer.")
                      self.assertRegex(self.getOutput(), r"(True[\s\n]*){5}", "Testing that you produced 5 True's.")

              myTests().main()
      </tests>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions