Mercurial > silorider
view tests/mockutil.py @ 41:1db1890edcf5
Change populate command's 'until' argument to be exclusive and support time
The argument can now specify a time within the day, but this forces the
argument to now be exclusive. So if only a date is provided (no time),
you need to enter the next day, i.e. the first day to *not* be included.
This makes the argument effectively exclusive.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 20 Aug 2023 11:14:31 -0700 |
parents | 27543b2e73b9 |
children | b404445082f8 |
line wrap: on
line source
def mock_urllib(m): import urllib.request m.setattr(urllib.request, 'urlretrieve', _patched_urlretrieve) m.setattr(urllib.request, 'urlcleanup', _patched_urlcleanup) return m def _patched_urlretrieve(url): return ('/retrieved/' + url.lstrip('/'), None) def _patched_urlcleanup(): pass