class TestCase:

    def assertEqual(value, expected):
        if value != expected:
            raise CaseFailed("{0} != {1}")

    def assertTrue(value):
        assertEqual(value, True)

    def assertFalse(value):
        assertEqual(value, False)

class CaseFailed(Exception):

    def __init__(self, message):
        self.message = message

    def __str__(self):
        return message

class TestCase:

    def assertEqual(self, value, expected):
        if value != expected:
            raise CaseFailed("{0} != {1}".format(value, expected))

    def assertTrue(self, value):
        assertEqual(value, True)

    def assertFalse(self, value):
        assertEqual(value, False)

class CaseFailed(Exception):

    def __init__(self, message):
        self.message = message

    def __str__(self):
        return self.message

Fix missing self in class methods and wrong formatting
Fix missing self in class methods and wrong formatting

  class TestCase:
  
-     def assertEqual(value, expected):
+     def assertEqual(self, value, expected):
          if value != expected:
-             raise CaseFailed("{0} != {1}")
+             raise CaseFailed("{0} != {1}".format(value, expected))
  
-     def assertTrue(value):
+     def assertTrue(self, value):
          assertEqual(value, True)
  
-     def assertFalse(value):
+     def assertFalse(self, value):
          assertEqual(value, False)
  
  class CaseFailed(Exception):
  
      def __init__(self, message):
          self.message = message
  
      def __str__(self):
-         return message
+         return self.message
  
Fix missing self in class methods and wrong formatting
## Code Before:
class TestCase:

    def assertEqual(value, expected):
        if value != expected:
            raise CaseFailed("{0} != {1}")

    def assertTrue(value):
        assertEqual(value, True)

    def assertFalse(value):
        assertEqual(value, False)

class CaseFailed(Exception):

    def __init__(self, message):
        self.message = message

    def __str__(self):
        return message

## Instruction:
Fix missing self in class methods and wrong formatting
## Code After:
class TestCase:

    def assertEqual(self, value, expected):
        if value != expected:
            raise CaseFailed("{0} != {1}".format(value, expected))

    def assertTrue(self, value):
        assertEqual(value, True)

    def assertFalse(self, value):
        assertEqual(value, False)

class CaseFailed(Exception):

    def __init__(self, message):
        self.message = message

    def __str__(self):
        return self.message
