Skip to content

Instantly share code, notes, and snippets.

@dob

dob/test_date.py Secret

Created November 21, 2008 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dob/4219a1d1dd2e76539579 to your computer and use it in GitHub Desktop.
Save dob/4219a1d1dd2e76539579 to your computer and use it in GitHub Desktop.
def test_duration(self):
self.assert_(self.duration.years == 12)
self.assert_(self.duration.months == 1)
def test_negative_duration(self):
duration = EYearMonthDuration(3, 2, NEGATIVE)
self.assert_(duration.years == -3)
self.assert_(duration.months == -2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment