django-whatever icon indicating copy to clipboard operation
django-whatever copied to clipboard

``xunit.any_date`` and ``xunit.any_datetime`` ``to_date`` argument shouldn't be evaluated at creation time

Open drtyrsa opened this issue 12 years ago • 1 comments

This

def any_date(from_date=date(1990, 1, 1), to_date=date.today()):

is not a very good idea. If the code runs for a lot of time, to_date won't be changing. At it makes documentation misleading:

django_any.xunit.any_date(from_date=datetime.date(1990, 1, 1), to_date=datetime.date(2012, 5, 3))

Seems like a strange default choice for to_date. :-)

drtyrsa avatar Jun 02 '12 11:06 drtyrsa

Pull request #33

drtyrsa avatar Jun 02 '12 11:06 drtyrsa