Example #1
0
    def test_adding(self):
        """Does the adder add? """
        adder = Adder()

        for i in range(-10, 10):
            for j in range(-10, 10):
                self.assertEqual(i + j, adder.calc(i, j))
    def test_adding(self):
        """Test case that adds from range -10 to 10"""
        adder = Adder()

        for i in range(-10, 10):
            for j in range(-10, 10):
                self.assertEqual(i + j, adder.calc(i, j))
Example #3
0
    def test_adding(self):
        """Method doc string."""
        adder = Adder()

        for i in range(-10, 10):
            for j in range(-10, 10):
                self.assertEqual(i + j, adder.calc(i, j))
Example #4
0
    def test_adding(self):
        """ Accuracy test. """
        adder = Adder()

        for i in range(-10, 10):
            for j in range(-10, 10):
                self.assertEqual(i + j, adder.calc(i, j))
    def test_adding(self):
        """Perform tests on Adder class."""
        adder = Adder()

        for i in range(-10, 10):
            for j in range(-10, 10):
                self.assertEqual(i + j, adder.calc(j, i))
    def test_adding(self):
        """For a range of numbers, expected value must equal actual value."""
        adder = Adder()

        for i in range(-10, 10):
            for j in range(-10, 10):
                self.assertEqual(i + j, adder.calc(i, j))
Example #7
0
    def test_adding(self):
        '''doc string'''
        adder = Adder()

        for i in range(-10, 10):
            for j in range(-10, 10):
                self.assertEqual(i + j, adder.calc(i, j))
Example #8
0
    def test_adding(self):
        """confirm adder returns expected result"""
        adder = Adder()

        for i in range(-10, 10):
            for j in range(-10, 10):
                self.assertEqual(i + j, adder.calc(i, j))
Example #9
0
    def test_adding(self):
        """Loops through all combinations from -10 to 10"""

        adder = Adder()

        for i in range(-10, 10):
            for j in range(-10, 10):
                self.assertEqual(i + j, adder.calc(i, j))
 def test_adding(self):
     """
     Make sure the `Adder` class produces the correct value.
     """
     adder = Adder()
     for i in range(-10, 10):
         for j in range(-10, 10):
             self.assertEqual(i + j, adder.calc(i, j))
Example #11
0
    def test_adding(self):
        """
        This method tests adder
        """
        adder = Adder()

        for i in range(-10, 10):
            for j in range(-10, 10):
                self.assertEqual(i + j, adder.calc(i, j))
Example #12
0
    def test_adding(self): #Test method has to begin with word "test"
        """
        Tests adder calc method
        """
        
        adder = Adder() #Instantiate

        for i in range(-10, 10):
            for j in range(-10, 10):
                self.assertEqual(i + j, adder.calc(i, j))
    def test_adder(self):
        """
        Tests the Adder's calc method

        Expected Result Example: 2 + 2 = 4
        """
        adder = Adder()

        for i in range(-10, 10):
            for j in range(-10, 10):
                self.assertEqual(i + j, adder.calc(i, j))