Mercurial > hg
annotate tests/test-lrucachedict.py.out @ 31971:73e9328e5307
obsolescence: add test case D-3 for obsolescence markers exchange
About 3 years ago, in August 2014, the logic to select what markers to select on
push was ported from the evolve extension to Mercurial core. However, for some
unclear reasons, the tests for that logic were not ported alongside.
I realised it a couple of weeks ago while working on another push related issue.
I've made a clean up pass on the tests and they are now ready to integrate the
core test suite. This series of changesets do not change any logic. I just adds
test for logic that has been around for about 10 versions of Mercurial.
They are a patch for each test case. It makes it easier to review and postpone
one with documentation issues without rejecting the wholes series.
This patch introduce case D3: missing prune target (prune not in "pushed set")
Each test case comes it in own test file. It help parallelism and does not
introduce a significant overhead from having a single unified giant test file.
Here are timing to support this claim.
# Multiple test files version:
# run-tests.py --local -j 1 test-exchange-*.t
53.40s user 6.82s system 85% cpu 1:10.76 total
52.79s user 6.97s system 85% cpu 1:09.97 total
52.94s user 6.82s system 85% cpu 1:09.69 total
# Single test file version:
# run-tests.py --local -j 1 test-exchange-obsmarkers.t
52.97s user 6.85s system 85% cpu 1:10.10 total
52.64s user 6.79s system 85% cpu 1:09.63 total
53.70s user 7.00s system 85% cpu 1:11.17 total
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 10 Apr 2017 16:54:43 +0200 |
parents | 6cd3044985c2 |
children |
rev | line source |
---|---|
18603 | 1 'a' in d: True |
2 d['a']: va | |
3 'b' in d: True | |
4 d['b']: vb | |
5 'c' in d: True | |
6 d['c']: vc | |
7 'd' in d: True | |
8 d['d']: vd | |
9 'a' in d: False | |
10 'b' in d: True | |
11 d['b']: vb | |
12 'c' in d: True | |
13 d['c']: vc | |
14 'd' in d: True | |
15 d['d']: vd | |
16 'e' in d: True | |
17 d['e']: ve | |
18 'b' in d: True | |
19 d['b']: vb2 | |
20 'c' in d: True | |
21 d['c']: vc2 | |
22 'd' in d: True | |
23 d['d']: vd | |
24 'e' in d: False | |
25 'f' in d: True | |
26 d['f']: vf | |
19710
887ffa22fd0d
lrucachedict: implement clear()
Siddharth Agarwal <sid0@fb.com>
parents:
18603
diff
changeset
|
27 'b' in d: False |
887ffa22fd0d
lrucachedict: implement clear()
Siddharth Agarwal <sid0@fb.com>
parents:
18603
diff
changeset
|
28 'c' in d: False |
887ffa22fd0d
lrucachedict: implement clear()
Siddharth Agarwal <sid0@fb.com>
parents:
18603
diff
changeset
|
29 'd' in d: False |
887ffa22fd0d
lrucachedict: implement clear()
Siddharth Agarwal <sid0@fb.com>
parents:
18603
diff
changeset
|
30 'e' in d: False |
887ffa22fd0d
lrucachedict: implement clear()
Siddharth Agarwal <sid0@fb.com>
parents:
18603
diff
changeset
|
31 'f' in d: False |
27371
45d996a566d7
util: reimplement lrucachedict
Gregory Szorc <gregory.szorc@gmail.com>
parents:
19710
diff
changeset
|
32 'a' in d: True |
45d996a566d7
util: reimplement lrucachedict
Gregory Szorc <gregory.szorc@gmail.com>
parents:
19710
diff
changeset
|
33 d['a']: 1 |
45d996a566d7
util: reimplement lrucachedict
Gregory Szorc <gregory.szorc@gmail.com>
parents:
19710
diff
changeset
|
34 'b' in d: True |
45d996a566d7
util: reimplement lrucachedict
Gregory Szorc <gregory.szorc@gmail.com>
parents:
19710
diff
changeset
|
35 d['b']: 2 |
27576
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
36 |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
37 All of these should be present: |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
38 'a' in dc: True |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
39 dc['a']: va3 |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
40 'b' in dc: True |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
41 dc['b']: vb3 |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
42 'c' in dc: True |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
43 dc['c']: vc3 |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
44 'd' in dc: True |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
45 dc['d']: vd3 |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
46 |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
47 All of these except 'a' should be present: |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
48 'a' in dc: False |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
49 'b' in dc: True |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
50 dc['b']: vb3 |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
51 'c' in dc: True |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
52 dc['c']: vc3 |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
53 'd' in dc: True |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
54 dc['d']: vd3 |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
55 'e' in dc: True |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
56 dc['e']: ve3 |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
57 |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
58 These should be in reverse alphabetical order and read 'v?3': |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
59 d['d']: vd3 |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
60 d['c']: vc3 |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
61 d['b']: vb3 |
6cd3044985c2
lrucachedict: add copy method
Eric Sumner <ericsumner@fb.com>
parents:
27371
diff
changeset
|
62 d['a']: va3 |