Пример #1
0
 def test_7(self):
     tax = TaxCaculator()
     tax.set_income(120000000)
     result = tax.calculate_income_2()
     assert result == 32150000
Пример #2
0
 def test_6(self):
     tax = TaxCaculator()
     tax.set_income(55000000)
     result = tax.calculate_income_2()
     assert result == 10650000
Пример #3
0
 def test_6_boundary(self):
     tax = TaxCaculator()
     tax.set_income(80000000)
     result = tax.calculate_income_2()
     assert result == 18150000
Пример #4
0
 def test_5(self):
     tax = TaxCaculator()
     tax.set_income(35000000)
     result = tax.calculate_income_1()
     assert result == 5500000
Пример #5
0
 def test_5_boundary(self):
     tax = TaxCaculator()
     tax.set_income(52000000)
     result = tax.calculate_income_2()
     assert result == 9750000
Пример #6
0
 def test_4(self):
     tax = TaxCaculator()
     tax.set_income(19000000)
     result = tax.calculate_income_1()
     assert result == 2150000
Пример #7
0
 def test_4_boundary(self):
     tax = TaxCaculator()
     tax.set_income(32000000)
     result = tax.calculate_income_1()
     assert result == 4750000
Пример #8
0
 def test_string_income(self):
     with pytest.raises(Exception):
         tax = TaxCaculator()
         tax.set_income('1 million')
Пример #9
0
 def test_3_boundary(self):
     tax = TaxCaculator()
     tax.set_income(18000000)
     result = tax.calculate_income_1()
     assert result == 1950000
Пример #10
0
 def test_3(self):
     tax = TaxCaculator()
     tax.set_income(12000000)
     result = tax.calculate_income_1()
     assert result == 1050000
Пример #11
0
 def test_negative_income(self):
     with pytest.raises(Exception):
         tax = TaxCaculator()
         tax.set_income(-12000000)
 def testTaxCalculatorWayTwo(self, test_input, test_expected):
     tax = TaxCaculator()
     tax.set_income(test_input)
     result = tax.calculate_income_2()
     assert result == test_expected