Example #1
0
    def test_decimal_case(self):
        """Test decimal case for Factorial"""
        init_value: int = 3.14
        result_to_compare: int = 'Wrong data given to function'

        fact_result = factorial(init_value)

        self.assertEqual(fact_result, result_to_compare)
Example #2
0
    def test_non_number_case(self):
        """Test non number case for Factorial"""
        init_value = 'LOL'
        result_to_compare = 'Wrong data given to function'

        fact_result = factorial(init_value)

        self.assertEqual(fact_result, result_to_compare)
Example #3
0
    def test_one_case(self):
        """Test 1 case for Factorial"""
        init_value: int = 1
        result_to_compare: int = 1

        fact_result = factorial(init_value)

        self.assertEqual(fact_result, result_to_compare)
Example #4
0
    def test_negative_case(self):
        """Test negative case for Factorial"""
        init_value: int = -6
        result_to_compare = 'Wrong data given to function'

        fact_result = factorial(init_value)

        self.assertEqual(fact_result, result_to_compare)
Example #5
0
    def test_positive_case(self):
        """Test positive case for Factorial"""
        init_value: int = 6
        result_to_compare: int = 720

        fact_result = factorial(init_value)

        self.assertEqual(fact_result, result_to_compare)
Example #6
0
    def test_large_int_number_case(self):
        """Test large int number case for Factorial"""
        init_value: int = 100
        result_to_compare: int = (
            93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
        )

        fact_result = factorial(init_value)

        self.assertEqual(fact_result, result_to_compare)