Vincent Davis added the comment:
Rather than dealing with the time delta how about getting the time twice and
checking that we are between and at least once we have the same day.
i.e.
ts1 = time()
today = self.theclass.today()
ts2 = time()
todayagain1 = self.theclass.fromtimestamp(ts1)
todayagain2 = self.theclass.fromtimestamp(ts2)
#This would then cover all the cases could separate these cases, I dontsee the
need for a loop.
self.assertTrue(today == todayagain1 or today == todayagain2
or todayagain1 <= today <= todayagain1)
----------
nosy: +Vincentdavis
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue15933>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com