Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
dnadeau4 committed Aug 28, 2017
1 parent 17300be commit b227796
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Test/test_cdtime.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import cdtime
import unittest
class TestCDTIME(unittest.TestCase):

def testReltime(self):
a = cdtime.reltime(28, "days since 1996-1-1")
self.assertEqual(repr(a),'28.000000 days since 1996-1-1')

def testRomptime(self):
c = cdtime.comptime(1996, 2, 28)
self.assertEqual(repr(c),"1996-2-28 0:0:0.0")
newtime = c.torel("days since 1995-1-1")
self.assertEqual(repr(newtime), '423.000000 days since 1995-1-1')

if __name__ == "__main__":
unittest.main()

0 comments on commit b227796

Please sign in to comment.