Commit 5abb3068 authored by Andreas Jung's avatar Andreas Jung

Collector #234: added functions JulianDay() and week() to calculate

the Julian day and the week in the current year based on the Julian
calendar.
parent 69fec4f5
This diff is collapsed.
......@@ -218,6 +218,18 @@ class DateTimeTests (unittest.TestCase):
self.assertEqual( ref1, isoDt)
def testJulianWeek(self):
""" check JulianDayWeek function """
lines = open('julian_testdata.txt').readlines()
for line in lines:
d = DateTime(line[:10])
result_from_mx=tuple(map(int, line[12:-2].split(',')))
self.assertEqual(result_from_mx[1], d.week())
def test_suite():
return unittest.makeSuite(DateTimeTests)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment