# HG changeset patch # User Pierre-Yves David # Date 2019-06-19 15:26:16 # 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 --git a/tests/test-bookmarks-corner-case.t b/tests/test-bookmarks-corner-case.t --- a/tests/test-bookmarks-corner-case.t +++ b/tests/test-bookmarks-corner-case.t @@ -121,8 +121,10 @@ We build a server side extension for thi > 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 @@ We build a server side extension for thi > 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)