Mercurial > hg
comparison tests/test-storage.py @ 40363:c3ad9ef0876c
tests: don't emit false failures when sqlite3 is missing
I'm honestly surprised we have buildbot coverage for this, but we do!
Differential Revision: https://phab.mercurial-scm.org/D5150
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 18 Oct 2018 11:14:04 -0400 |
parents | fed697fa1734 |
children | 1bf3e6041e2c |
comparison
equal
deleted
inserted
replaced
40362:2f1edf5e0a4b | 40363:c3ad9ef0876c |
---|---|
15 | 15 |
16 from mercurial.testing import ( | 16 from mercurial.testing import ( |
17 storage as storagetesting, | 17 storage as storagetesting, |
18 ) | 18 ) |
19 | 19 |
20 from hgext import ( | 20 try: |
21 sqlitestore, | 21 from hgext import ( |
22 ) | 22 sqlitestore, |
23 ) | |
24 except ImportError: | |
25 sqlitestore = None | |
23 | 26 |
24 try: | 27 try: |
25 from mercurial import zstd | 28 from mercurial import zstd |
26 zstd.__version__ | 29 zstd.__version__ |
27 except ImportError: | 30 except ImportError: |
108 fl._addrawrevision(node, rawtext, tr, linkrev, p1, p2, | 111 fl._addrawrevision(node, rawtext, tr, linkrev, p1, p2, |
109 storedelta=delta, flags=flags) | 112 storedelta=delta, flags=flags) |
110 else: | 113 else: |
111 raise error.Abort(b'must supply rawtext or delta arguments') | 114 raise error.Abort(b'must supply rawtext or delta arguments') |
112 | 115 |
113 sqlitefileindextests = storagetesting.makeifileindextests( | 116 if sqlitestore is not None: |
114 makesqlitefile, maketransaction, addrawrevisionsqlite) | 117 sqlitefileindextests = storagetesting.makeifileindextests( |
115 sqlitefiledatatests = storagetesting.makeifiledatatests( | 118 makesqlitefile, maketransaction, addrawrevisionsqlite) |
116 makesqlitefile, maketransaction, addrawrevisionsqlite) | 119 sqlitefiledatatests = storagetesting.makeifiledatatests( |
117 sqlitefilemutationtests = storagetesting.makeifilemutationtests( | 120 makesqlitefile, maketransaction, addrawrevisionsqlite) |
118 makesqlitefile, maketransaction, addrawrevisionsqlite) | 121 sqlitefilemutationtests = storagetesting.makeifilemutationtests( |
122 makesqlitefile, maketransaction, addrawrevisionsqlite) | |
119 | 123 |
120 if __name__ == '__main__': | 124 if __name__ == '__main__': |
121 silenttestrunner.main(__name__) | 125 silenttestrunner.main(__name__) |