@@ -33,9 +33,10 @@ def test_snippets_rst(
33
33
builder .src_path .joinpath ("index.rst" ).write_text (content , encoding = "utf8" )
34
34
write_assets (builder .src_path )
35
35
builder .build ()
36
- pformat = builder .get_doctree ("index" ).pformat ()
36
+ doctree = builder .get_doctree ("index" , post_transforms = False )
37
+ doctree .attributes .pop ("translation_progress" , None ) # added in sphinx 7.1
37
38
file_regression .check (
38
- pformat ,
39
+ doctree . pformat () ,
39
40
basename = f"snippet_pre_{ path .name [:- len (path .suffix )]} " ,
40
41
extension = ".xml" ,
41
42
encoding = "utf8" ,
@@ -56,8 +57,10 @@ def test_snippets_myst(
56
57
builder .src_path .joinpath ("index.md" ).write_text (content , encoding = "utf8" )
57
58
write_assets (builder .src_path )
58
59
builder .build ()
60
+ doctree = builder .get_doctree ("index" , post_transforms = False )
61
+ doctree .attributes .pop ("translation_progress" , None ) # added in sphinx 7.1
59
62
file_regression .check (
60
- builder . get_doctree ( "index" ) .pformat (),
63
+ doctree .pformat (),
61
64
basename = f"snippet_pre_{ path .name [:- len (path .suffix )]} " ,
62
65
extension = ".xml" ,
63
66
encoding = "utf8" ,
@@ -78,9 +81,10 @@ def test_snippets_rst_post(
78
81
builder .src_path .joinpath ("index.rst" ).write_text (content , encoding = "utf8" )
79
82
write_assets (builder .src_path )
80
83
builder .build ()
81
- pformat = builder .get_doctree ("index" , post_transforms = True ).pformat ()
84
+ doctree = builder .get_doctree ("index" , post_transforms = True )
85
+ doctree .attributes .pop ("translation_progress" , None ) # added in sphinx 7.1
82
86
file_regression .check (
83
- pformat ,
87
+ doctree . pformat () ,
84
88
basename = f"snippet_post_{ path .name [:- len (path .suffix )]} " ,
85
89
extension = ".xml" ,
86
90
encoding = "utf8" ,
@@ -101,8 +105,10 @@ def test_snippets_myst_post(
101
105
builder .src_path .joinpath ("index.md" ).write_text (content , encoding = "utf8" )
102
106
write_assets (builder .src_path )
103
107
builder .build ()
108
+ doctree = builder .get_doctree ("index" , post_transforms = True )
109
+ doctree .attributes .pop ("translation_progress" , None ) # added in sphinx 7.1
104
110
file_regression .check (
105
- builder . get_doctree ( "index" , post_transforms = True ) .pformat (),
111
+ doctree .pformat (),
106
112
basename = f"snippet_post_{ path .name [:- len (path .suffix )]} " ,
107
113
extension = ".xml" ,
108
114
encoding = "utf8" ,
@@ -117,8 +123,10 @@ def test_sd_hide_title_rst(
117
123
content = ":sd_hide_title:\n \n Heading\n -------\n \n content"
118
124
builder .src_path .joinpath ("index.rst" ).write_text (content , encoding = "utf8" )
119
125
builder .build ()
126
+ doctree = builder .get_doctree ("index" , post_transforms = False )
127
+ doctree .attributes .pop ("translation_progress" , None ) # added in sphinx 7.1
120
128
file_regression .check (
121
- builder . get_doctree ( "index" , post_transforms = False ) .pformat (),
129
+ doctree .pformat (),
122
130
basename = "sd_hide_title" ,
123
131
extension = ".xml" ,
124
132
encoding = "utf8" ,
@@ -133,8 +141,10 @@ def test_sd_hide_title_myst(
133
141
content = "---\n sd_hide_title: true\n ---\n \n # Heading\n \n content"
134
142
builder .src_path .joinpath ("index.md" ).write_text (content , encoding = "utf8" )
135
143
builder .build ()
144
+ doctree = builder .get_doctree ("index" , post_transforms = False )
145
+ doctree .attributes .pop ("translation_progress" , None ) # added in sphinx 7.1
136
146
file_regression .check (
137
- builder . get_doctree ( "index" , post_transforms = False ) .pformat (),
147
+ doctree .pformat (),
138
148
basename = "sd_hide_title" ,
139
149
extension = ".xml" ,
140
150
encoding = "utf8" ,
0 commit comments