# HG changeset patch # User Pierre-Yves David # Date 1560957976 -7200 # Node ID c4d1807b165f87adc865de8c992ba5e0de0084c1 # Parent febf5c8215c12d07729f3af0b1005e4387b3508c test: add some assert in the bookrace extension This cannot hurt to have a bit more security in the test extension. diff -r febf5c8215c1 -r c4d1807b165f tests/test-bookmarks-corner-case.t --- a/tests/test-bookmarks-corner-case.t Wed Jun 19 05:46:07 2019 +0200 +++ b/tests/test-bookmarks-corner-case.t Wed Jun 19 17:26:16 2019 +0200 @@ -121,8 +121,10 @@ > import atexit > from mercurial import error, extensions, bookmarks > - > def wait(): + > def wait(repo): > if not os.path.exists('push-A-started'): + > assert repo._currentlock(repo._lockref) is None + > assert repo._currentlock(repo._wlockref) is None > print('setting raced push up') > with open('push-A-started', 'w'): > pass @@ -134,7 +136,7 @@ > time.sleep(0.1) > > def wrapinit(orig, self, repo): - > wait() + > wait(repo) > return orig(self, repo) > def uisetup(ui): > extensions.wrapfunction(bookmarks.bmstore, '__init__', wrapinit)