Ejemplo n.º 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))
Ejemplo n.º 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))
Ejemplo n.º 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))
Ejemplo n.º 5
0
    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))
Ejemplo n.º 6
0
    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))
Ejemplo n.º 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))
Ejemplo n.º 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))
Ejemplo n.º 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))
Ejemplo n.º 10
0
 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))
Ejemplo n.º 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))
Ejemplo n.º 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))
Ejemplo n.º 13
0
    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))