Skip to content

Commit 5c0c683

Browse files
committed
Add second list for image comparisons
1 parent e7199ea commit 5c0c683

File tree

5 files changed

+30
-25
lines changed

5 files changed

+30
-25
lines changed

.github/scripts/test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ case $1 in
108108
;;
109109

110110
make-baselines-mathjax3)
111-
python test/image/make_baseline.py mathjax3 legend_mathjax_title_and_items mathjax parcats_grid_subplots table_latex_multitrace_scatter table_plain_birds table_wrapped_birds ternary-mathjax ternary-mathjax-title-place-subtitle || EXIT_STATE=$?
111+
MATHJAX3_MOCKS=$(jq -r '.compare_mathjax3 | join(" ")' test/image/compare_pixels_collections.json)
112+
python test/image/make_baseline.py mathjax3 $MATHJAX3_MOCKS || EXIT_STATE=$?
112113
exit $EXIT_STATE
113114
;;
114115

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"compare_disallow": [
3+
"map_angles",
4+
"map_fonts-supported-open-sans-weight",
5+
"map_fonts-supported-open-sans",
6+
"map_layers",
7+
"map_predefined-styles2",
8+
"map_scattercluster",
9+
"map_stamen-style"
10+
],
11+
"compare_mathjax3": [
12+
"legend_mathjax_title_and_items",
13+
"mathjax",
14+
"parcats_grid_subplots",
15+
"table_latex_multitrace_scatter",
16+
"table_plain_birds",
17+
"table_wrapped_birds",
18+
"ternary-mathjax",
19+
"ternary-mathjax-title-place-subtitle"
20+
]
21+
}

test/image/compare_pixels_test.mjs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,10 @@ argv._.forEach((pattern) => {
6363

6464
const skipped = new Set();
6565
const failed = new Set();
66-
// TODO: In Node 20+, replace with: import disallowListData from './disallow_list.json' with { type: 'json' };
67-
const disallowListPath = path.join(__dirname, 'disallow_list.json');
68-
const disallowList = new Set(JSON.parse(fs.readFileSync(disallowListPath)));
66+
// TODO: In Node 20+, replace with: import collections from './compare_pixels_collections.json' with { type: 'json' };
67+
const collectionsPath = path.join(__dirname, 'compare_pixels_collections.json');
68+
const collections = JSON.parse(fs.readFileSync(collectionsPath));
69+
const disallowList = new Set(collections.compare_disallow);
6970
const flakyList = new Set(['gl3d_bunny-hull']);
7071
const flakyListMaps = new Set([
7172
// more flaky
@@ -89,16 +90,7 @@ if (virtualWebgl) {
8990
}
9091

9192
if (mathjax3) {
92-
allMockList = [
93-
'legend_mathjax_title_and_items',
94-
'mathjax',
95-
'parcats_grid_subplots',
96-
'table_latex_multitrace_scatter',
97-
'table_plain_birds',
98-
'table_wrapped_birds',
99-
'ternary-mathjax',
100-
'ternary-mathjax-title-place-subtitle'
101-
];
93+
allMockList = collections.compare_mathjax3;
10294
}
10395
allMockList = new Set(allMockList);
10496

test/image/disallow_list.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

test/image/make_baseline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@
6868
else:
6969
allNames = ALL_MOCKS
7070

71-
with open(os.path.join(root, "test", "image", "disallow_list.json"), "r") as f:
71+
with open(os.path.join(root, "test", "image", "compare_pixels_collections.json"), "r") as f:
7272
# unable to generate baselines for the following mocks
73-
disallowList = set(json.load(f))
73+
disallowList = set(json.load(f)["compare_disallow"])
7474
allNames = [a for a in allNames if a not in disallowList]
7575

7676
if len(allNames) == 0:

0 commit comments

Comments
 (0)