-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.py
35 lines (26 loc) · 1.17 KB
/
tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
'''
Created on 10.11.2012
@author: jussikin
'''
import unittest
from datetime import datetime
import Arki
class Test(unittest.TestCase):
def testUuusivuosi(self):
uusivuosi = datetime(year=2013,day=1,month=1)
self.assertFalse(Arki.isWorkday(uusivuosi), "New year should be holyday")
def testNormalDay(self):
normalDay = datetime(year=2012,day=8,month=11)
self.assertTrue(Arki.isWorkday(normalDay), "year=2012,day=8,month=11 Should be normal work day ")
def testSaturdayDay(self):
sat = datetime(year=2012,day=10,month=11)
self.assertFalse(Arki.isWorkday(sat), "year=2012,day=10,month=11 Should not be workday")
def testSundayDay(self):
sun = datetime(year=2012,day=11,month=11)
self.assertFalse(Arki.isWorkday(sun), "year=2012,day=11,month=11 Should not be workday")
def testEasterDay(self):
sun = datetime(year=2017,day=16,month=4)
self.assertFalse(Arki.isWorkday(sun), "year=2017,day=16,month=4 Should not be workday")
if __name__ == "__main__":
#import sys;sys.argv = ['', 'Test.testName']
unittest.main()