/[lohnrechner]/trunk/test_Lohnsteuer2006.py
ViewVC logotype

Annotation of /trunk/test_Lohnsteuer2006.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5 - (hide annotations)
Wed Jan 12 17:16:34 2005 UTC (20 years, 3 months ago) by wilde
Original Path: trunk/RCS/test_Lohnsteuer.py
File MIME type: text/x-python
File size: 3303 byte(s)
Initial revision

1 wilde 5 # --------------------------------------------------------------------
2     # UnitTest für die Lohnsteuerberechnung in LST2005
3     # $Id$
4     # --------------------------------------------------------------------
5     #
6     # Copyright (c) 2005 by Intevation GmbH
7     # Authors:
8     # Sascha Wilde <[email protected]>
9     #
10     # This program is free software under the GPL (>=v2)
11     # Read the file COPYING coming with this package for details.
12    
13     """Unit Test für die Lohnsteuerberechnung in LST2005. Benutzt die
14     Daten aus der Prüftabelle zum offiziellen Programmablaufplan zur
15     maschinellen Jahreslohnsteürberechnung 2005."""
16    
17     # ACHTUNG: die Prüftabelle liefert nur Referenzwerte für die
18     # Berechnung der Lohnsteuer auf ein Jahr, andere Berechnungßeiträume
19     # werden nicht berücksichtigt.
20    
21     import unittest
22     from LST2005 import *
23    
24     class TestGetLohnsteuer(unittest.TestCase):
25    
26     def SetUp(self):
27     """Offizielle Prüftabelle und LStRechner2005 einrichten"""
28     self.prueftabelle = {
29     5000 : [ 0.0, 0.0, 0.0, 0.0, 612.0, 750.0 ],
30     7500 : [ 0.0, 0.0, 0.0, 0.0, 987.0, 1125.0 ],
31     10000: [ 0.0, 0.0, 0.0, 0.0, 1362.0, 1739.0 ],
32     12500: [ 232.0, 18.0, 0.0, 232.0, 2403.0, 2789.0 ],
33     15000: [ 714.0, 444.0, 0.0, 714.0, 3400.0, 3722.0 ],
34     17500: [ 1362.0, 1043.0, 0.0, 1362.0, 4266.0, 4576.0 ],
35     20000: [ 2063.0, 1727.0, 0.0, 2063.0, 5126.0, 5458.0 ],
36     22500: [ 2725.0, 2375.0, 264.0, 2725.0, 6044.0, 6398.0 ],
37     25000: [ 3417.0, 3051.0, 628.0, 3417.0, 7020.0, 7394.0 ],
38     27500: [ 4126.0, 3746.0, 1104.0, 4126.0, 8052.0, 8438.0 ],
39     30000: [ 4860.0, 4465.0, 1634.0, 4860.0, 9102.0, 9488.0 ],
40     32500: [ 5620.0, 5211.0, 2240.0, 5620.0, 10152.0, 10538.0 ],
41     35000: [ 6408.0, 5984.0, 2952.0, 6408.0, 11202.0, 11588.0 ],
42     37500: [ 7224.0, 6785.0, 3684.0, 7224.0, 12252.0, 12638.0 ],
43     40000: [ 8068.0, 7614.0, 4364.0, 8068.0, 13302.0, 13688.0 ],
44     42500: [ 8938.0, 8470.0, 5026.0, 8938.0, 14352.0, 14738.0 ],
45     45000: [ 9836.0, 9354.0, 5700.0, 9836.0, 15402.0, 15788.0 ],
46     47500: [ 10762.0, 10265.0, 6390.0, 10762.0, 16452.0, 16838.0 ],
47     50000: [ 11715.0, 11203.0, 7094.0, 11715.0, 17502.0, 17888.0 ],
48     52500: [ 12696.0, 12169.0, 7806.0, 12696.0, 18552.0, 18938.0 ],
49     55000: [ 13704.0, 13163.0, 8524.0, 13704.0, 19602.0, 19988.0 ],
50     57500: [ 14733.0, 14183.0, 9254.0, 14733.0, 20652.0, 21038.0 ],
51     60000: [ 15763.0, 15213.0, 10000.0, 15763.0, 21702.0, 22088.0 ]
52     }
53     self.t = LStRechner2005()
54     self.t.SetZeitraum(JAHR)
55    
56     def test_lohnsteuer(self):
57     """Testet GetLohnsteuer gegen die offizielle Prüftabelle"""
58     self.SetUp()
59     for lohn in self.prueftabelle.keys():
60     for stkl in range(1, 7):
61     self.t.SetLohn(lohn)
62     self.t.SetSteuerklasse(stkl)
63     self.t.Calc()
64     self.assertEquals(self.t.GetLohnsteuer(),
65     self.prueftabelle[lohn][stkl - 1])
66    
67     if __name__ == "__main__":
68     unittest.main()

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26