def test_func_positive(): """Test positive cases.""" nose.tools.assert_equal(find_combinations(1, 1), 1) nose.tools.assert_equal(find_combinations(2, 4), 16) nose.tools.assert_equal(find_combinations(7, 3), 1344) nose.tools.assert_equal( find_combinations(99, 99), 366123817149514516148364806310978588296555911619520763646498043556906006656302314790963459686521537709701386771477994322892424507340183779831082307535480272964631807361347419289259402291608289280000 )
def test_func_negative(): """Test negative cases.""" nose.tools.assert_equal( find_combinations('s', 'g'), 'Error! Please, enter positive numbers (etc. 2 and 3)') nose.tools.assert_equal( find_combinations(-5, 5), 'Error! Please, enter positive numbers (etc. 2 and 3)') nose.tools.assert_equal( find_combinations(-4, -4), 'Error! Please, enter positive numbers (etc. 2 and 3)') nose.tools.assert_equal( find_combinations(4, -10), 'Error! Please, enter positive numbers (etc. 2 and 3)') nose.tools.assert_equal( find_combinations(0, 5), 'Error! Please, enter positive numbers (etc. 2 and 3)') nose.tools.assert_equal( find_combinations(5, 0), 'Error! Please, enter positive numbers (etc. 2 and 3)') nose.tools.assert_equal( find_combinations(0, 0), 'Error! Please, enter positive numbers (etc. 2 and 3)') nose.tools.assert_equal(find_combinations(100, 100), 'please, choose lesser numm')
def test_func(): """Test of calculating number of ways of painting the fence with input 4 and 4.""" assert opt.find_combinations(4, 4) == 228
def test_f_func(number_of_posts, number_of_colors, value): """Test of calculating number of ways of painting the fence with different inputs.""" assert opt.find_combinations(number_of_posts, number_of_colors) == value
def test_1_1(self): assert opf.find_combinations(1, 1) == 1
def test_100_100(self): assert opf.find_combinations(100, 100) == 'please, choose lesser numm'
def test_0_0(self): assert opf.find_combinations( 0, 0) == 'Error! Please, enter positive numbers (etc. 2 and 3)'
def test_subzero(self): assert opf.find_combinations( -1, 3) == 'Error! Please, enter positive numbers (etc. 2 and 3)'
def test_99_99(self): assert opf.find_combinations( 99, 99 ) == 366123817149514516148364806310978588296555911619520763646498043556906006656302314790963459686521537709701386771477994322892424507340183779831082307535480272964631807361347419289259402291608289280000 366123817149514516148364806310978588296555911619520763646498043556906006656302314790963459686521537709701386771477994322892424507340183779831082307535480272964631807361347419289259402291608289280000
def test_13_14(self): assert opf.find_combinations(13, 14) == 752711352439774