ENH: Add direct methods for session start/end.

Rather than having to do 'start, _ = cal.open_and_close_for_session(dt)'
to get just the start, we can now do 'start = cal.session_start(dt)'.
This commit is contained in:
Scott Sanderson
2017-01-30 13:00:45 -05:00
parent 484f80dd01
commit e5f403deca
2 changed files with 20 additions and 0 deletions
+8
View File
@@ -670,6 +670,14 @@ class ExchangeCalendarTestBase(object):
found_open, found_close = \
self.calendar.open_and_close_for_session(session_label)
# Test that the methods for just session open and close produce the
# same values as the method for getting both.
alt_open = self.calendar.session_open(session_label)
self.assertEqual(alt_open, found_open)
alt_close = self.calendar.session_close(session_label)
self.assertEqual(alt_close, found_close)
self.assertEqual(open_answer, found_open)
self.assertEqual(close_answer, found_close)