예제 #1
0
def main():
    """
    This function brings together calculated income tax and
    calculated corporate tax reports a comparison
    """

    print('Application DRH Taxes')
    income, losses = admission()
    in_tax = Tax()
    indi_calc_tax = in_tax.calc_tax(income)
    cor_tax = COR()
    corp_calc_tax = cor_tax.corp(income, losses)

    msg = tax_compare(corp_calc_tax, indi_calc_tax)

    print(msg)
예제 #2
0
 def test_admission_incorrect_losses_trailing_letter_character(self):
     sys.argv = ['koala', '12435', '7825.s8']
     with self.assertRaises(SystemExit) as cm:
         admission.admission()
         self.assertEqual('Error Code: JELLYBEAN', cm.exception)
예제 #3
0
 def test_admission_incorrect_income_leading_letter_character(self):
     sys.argv = ['koala', 'f124.05', '44225']
     with self.assertRaises(SystemExit) as cm:
         admission.admission()
         self.assertEqual('Error Code: HUGH', cm.exception)
예제 #4
0
 def test_admission_incorrect_income_double_floating_point(self):
     sys.argv = ['koala', '1243..05', '44225']
     with self.assertRaises(SystemExit) as cm:
         admission.admission()
         self.assertEqual('Error Code: HUGH', cm.exception)
예제 #5
0
 def test_admission_one_input(self):
     sys.argv = ['koala', '12435']
     with self.assertRaises(SystemExit) as cm:
         admission.admission()
         self.assertEqual('Error Code: PANDA', cm.exception)
예제 #6
0
def main():

    income, losses = admission()

    print income, losses
예제 #7
0
 def test_admission_output_is_float(self):
     sys.argv = ['koala', '12435','7825.8']
     inc, loss = admission.admission()
     self.assertEqual(12435.0,inc)
     self.assertEqual(7825.8,loss)