Skip to content

Commit

Permalink
Add more test for market_time.py
Browse files Browse the repository at this point in the history
  • Loading branch information
LiaoU3 committed Jul 21, 2024
1 parent 9b90980 commit 5fc65c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_market_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ def test_init_close_date_set(self):
) # not in close_dates
self.assertTrue(len(mt.close_date_set) == 2)

def test_init_close_date_set_with_none(self):
mt.close_date_set.clear()
mt.init_close_date_set(None)
self.assertEqual(len(mt.close_date_set), 0)

def test__get_date_obj(self):
time = datetime.now()
self.assertTrue(time.date(), mt._get_date_obj(time)) # datetime
Expand Down

0 comments on commit 5fc65c1

Please sign in to comment.