comparison mercurial/testing/storage.py @ 45942:89a2afe31e82

formating: upgrade to black 20.8b1 This required a couple of small tweaks to un-confuse black, but now it works. Big formatting changes come from: * Dramatically improved collection-splitting logic upstream * Black having a strong (correct IMO) opinion that """ is better than ''' Differential Revision: https://phab.mercurial-scm.org/D9430
author Augie Fackler <raf@durin42.com>
date Fri, 27 Nov 2020 17:03:29 -0500
parents a5206e71c536
children 7a93b7b3dc2d
comparison
equal deleted inserted replaced
45941:346af7687c6f 45942:89a2afe31e82
1019 self.assertEqual(f.read(node2), fulltext2) 1019 self.assertEqual(f.read(node2), fulltext2)
1020 1020
1021 def testcensored(self): 1021 def testcensored(self):
1022 f = self._makefilefn() 1022 f = self._makefilefn()
1023 1023
1024 stored1 = storageutil.packmeta({b'censored': b'tombstone',}, b'') 1024 stored1 = storageutil.packmeta(
1025 {
1026 b'censored': b'tombstone',
1027 },
1028 b'',
1029 )
1025 1030
1026 with self._maketransactionfn() as tr: 1031 with self._maketransactionfn() as tr:
1027 node0 = f.add(b'foo', None, tr, 0, nullid, nullid) 1032 node0 = f.add(b'foo', None, tr, 0, nullid, nullid)
1028 1033
1029 # The node value doesn't matter since we can't verify it. 1034 # The node value doesn't matter since we can't verify it.
1048 # Like above, except we do the rawdata() request first to 1053 # Like above, except we do the rawdata() request first to
1049 # isolate revision caching behavior. 1054 # isolate revision caching behavior.
1050 1055
1051 f = self._makefilefn() 1056 f = self._makefilefn()
1052 1057
1053 stored1 = storageutil.packmeta({b'censored': b'tombstone',}, b'') 1058 stored1 = storageutil.packmeta(
1059 {
1060 b'censored': b'tombstone',
1061 },
1062 b'',
1063 )
1054 1064
1055 with self._maketransactionfn() as tr: 1065 with self._maketransactionfn() as tr:
1056 node0 = f.add(b'foo', None, tr, 0, nullid, nullid) 1066 node0 = f.add(b'foo', None, tr, 0, nullid, nullid)
1057 1067
1058 # The node value doesn't matter since we can't verify it. 1068 # The node value doesn't matter since we can't verify it.
1230 1240
1231 def testdeltaagainstcensored(self): 1241 def testdeltaagainstcensored(self):
1232 # Attempt to apply a delta made against a censored revision. 1242 # Attempt to apply a delta made against a censored revision.
1233 f = self._makefilefn() 1243 f = self._makefilefn()
1234 1244
1235 stored1 = storageutil.packmeta({b'censored': b'tombstone',}, b'') 1245 stored1 = storageutil.packmeta(
1246 {
1247 b'censored': b'tombstone',
1248 },
1249 b'',
1250 )
1236 1251
1237 with self._maketransactionfn() as tr: 1252 with self._maketransactionfn() as tr:
1238 node0 = f.add(b'foo\n' * 30, None, tr, 0, nullid, nullid) 1253 node0 = f.add(b'foo\n' * 30, None, tr, 0, nullid, nullid)
1239 1254
1240 # The node value doesn't matter since we can't verify it. 1255 # The node value doesn't matter since we can't verify it.