@@ -80,7 +80,7 @@ def test_serializable(sphinx_app_wrapper):
80
80
assert not bad , f"Non-serializable values found:\n { bad } "
81
81
82
82
83
- @pytest .mark .conf_file (
83
+ @pytest .mark .add_conf (
84
84
content = """
85
85
sphinx_gallery_conf = {
86
86
'examples_dirs': 'src',
@@ -100,7 +100,7 @@ def test_no_warning_simple_config(sphinx_app_wrapper):
100
100
assert build_warn == ""
101
101
102
102
103
- @pytest .mark .conf_file (
103
+ @pytest .mark .add_conf (
104
104
content = """
105
105
sphinx_gallery_conf = {
106
106
'examples_dirs': ['src', 'excess'],
@@ -123,15 +123,15 @@ def test_unequal_examples_gallery_dirs(sphinx_app_wrapper):
123
123
ConfigError ,
124
124
"Unknown string option for reset_modules" ,
125
125
id = "Resetter unknown" ,
126
- marks = pytest .mark .conf_file (
126
+ marks = pytest .mark .add_conf (
127
127
content = "sphinx_gallery_conf={'reset_modules': ('f',)}"
128
128
),
129
129
),
130
130
pytest .param (
131
131
ConfigError ,
132
132
"reset_modules.* must be callable" ,
133
133
id = "Resetter not callable" ,
134
- marks = pytest .mark .conf_file (
134
+ marks = pytest .mark .add_conf (
135
135
content = "sphinx_gallery_conf={'reset_modules': (1.,),}"
136
136
),
137
137
),
@@ -149,15 +149,15 @@ def test_bad_reset(sphinx_app_wrapper, err_class, err_match):
149
149
ConfigError ,
150
150
"'reset_modules_order' config allowed types" ,
151
151
id = "Resetter unknown" ,
152
- marks = pytest .mark .conf_file (
152
+ marks = pytest .mark .add_conf (
153
153
content = ("sphinx_gallery_conf=" "{'reset_modules_order': 1,}" )
154
154
),
155
155
),
156
156
pytest .param (
157
157
ConfigError ,
158
158
"reset_modules_order must be in" ,
159
159
id = "reset_modules_order not valid" ,
160
- marks = pytest .mark .conf_file (
160
+ marks = pytest .mark .add_conf (
161
161
content = ("sphinx_gallery_conf=" "{'reset_modules_order': 'invalid',}" )
162
162
),
163
163
),
@@ -175,15 +175,13 @@ def test_bad_reset_modules_order(sphinx_app_wrapper, err_class, err_match):
175
175
ConfigError ,
176
176
"Unknown css" ,
177
177
id = "CSS str error" ,
178
- marks = pytest .mark .conf_file (
179
- content = "sphinx_gallery_conf={'css': ('foo',)}"
180
- ),
178
+ marks = pytest .mark .add_conf (content = "sphinx_gallery_conf={'css': ('foo',)}" ),
181
179
),
182
180
pytest .param (
183
181
ConfigError ,
184
182
"config allowed types:" ,
185
183
id = "CSS type error" ,
186
- marks = pytest .mark .conf_file (content = "sphinx_gallery_conf={'css': 1.}" ),
184
+ marks = pytest .mark .add_conf (content = "sphinx_gallery_conf={'css': 1.}" ),
187
185
),
188
186
],
189
187
)
@@ -203,7 +201,7 @@ def test_bad_api():
203
201
_fill_gallery_conf_defaults (sphinx_gallery_conf )
204
202
205
203
206
- @pytest .mark .conf_file (
204
+ @pytest .mark .add_conf (
207
205
content = """
208
206
sphinx_gallery_conf = {
209
207
'backreferences_dir': os.path.join('gen_modules', 'backreferences'),
@@ -284,7 +282,7 @@ def _check_order(sphinx_app, key):
284
282
assert order == [1 , 2 , 3 ]
285
283
286
284
287
- @pytest .mark .conf_file (
285
+ @pytest .mark .add_conf (
288
286
content = """
289
287
sphinx_gallery_conf = {
290
288
'examples_dirs': 'src',
@@ -297,7 +295,7 @@ def test_example_sorting_default(sphinx_app_wrapper):
297
295
_check_order (sphinx_app , "lines" )
298
296
299
297
300
- @pytest .mark .conf_file (
298
+ @pytest .mark .add_conf (
301
299
content = """
302
300
sphinx_gallery_conf = {
303
301
'examples_dirs': 'src',
@@ -311,7 +309,7 @@ def test_example_sorting_filesize(sphinx_app_wrapper):
311
309
_check_order (sphinx_app , "filesize" )
312
310
313
311
314
- @pytest .mark .conf_file (
312
+ @pytest .mark .add_conf (
315
313
content = """
316
314
sphinx_gallery_conf = {
317
315
'examples_dirs': 'src',
@@ -325,7 +323,7 @@ def test_example_sorting_filename(sphinx_app_wrapper):
325
323
_check_order (sphinx_app , "filename" )
326
324
327
325
328
- @pytest .mark .conf_file (
326
+ @pytest .mark .add_conf (
329
327
content = """
330
328
sphinx_gallery_conf = {
331
329
'examples_dirs': 'src',
@@ -407,7 +405,7 @@ def test_collect_gallery_files_ignore_pattern(tmpdir, gallery_conf):
407
405
assert collected_files == expected_files
408
406
409
407
410
- @pytest .mark .conf_file (
408
+ @pytest .mark .add_conf (
411
409
content = """
412
410
sphinx_gallery_conf = {
413
411
'backreferences_dir' : os.path.join('modules', 'gen'),
@@ -439,7 +437,7 @@ def test_binder_copy_files(sphinx_app_wrapper):
439
437
).exists ()
440
438
441
439
442
- @pytest .mark .conf_file (
440
+ @pytest .mark .add_conf (
443
441
content = """
444
442
sphinx_gallery_conf = {
445
443
'examples_dirs': 'src',
@@ -474,7 +472,7 @@ def test_failing_examples_raise_exception(sphinx_app_wrapper):
474
472
assert bad_line in tb
475
473
476
474
477
- @pytest .mark .conf_file (
475
+ @pytest .mark .add_conf (
478
476
content = """
479
477
sphinx_gallery_conf = {
480
478
'examples_dirs': 'src',
@@ -490,7 +488,7 @@ def test_expected_failing_examples_were_executed(sphinx_app_wrapper):
490
488
sphinx_app_wrapper .build_sphinx_app ()
491
489
492
490
493
- @pytest .mark .conf_file (
491
+ @pytest .mark .add_conf (
494
492
content = """
495
493
sphinx_gallery_conf = {
496
494
'examples_dirs': 'src',
@@ -510,7 +508,7 @@ def test_only_warn_on_example_error(sphinx_app_wrapper):
510
508
assert "WARNING: Here is a summary of the problems" in build_warn
511
509
512
510
513
- @pytest .mark .conf_file (
511
+ @pytest .mark .add_conf (
514
512
content = """
515
513
sphinx_gallery_conf = {
516
514
'examples_dirs': 'src',
@@ -530,7 +528,7 @@ def test_only_warn_on_example_error_sphinx_warning(sphinx_app_wrapper):
530
528
assert "plot_3.py unexpectedly failed to execute" in exc
531
529
532
530
533
- @pytest .mark .conf_file (
531
+ @pytest .mark .add_conf (
534
532
content = """
535
533
sphinx_gallery_conf = {
536
534
'examples_dirs': 'src',
@@ -545,7 +543,7 @@ def test_examples_not_expected_to_pass(sphinx_app_wrapper):
545
543
assert "expected to fail, but not failing" in exc
546
544
547
545
548
- @pytest .mark .conf_file (
546
+ @pytest .mark .add_conf (
549
547
content = """
550
548
from sphinx_gallery.gen_rst import _sg_call_memory_noop
551
549
@@ -566,13 +564,13 @@ def test_show_memory_callable(sphinx_app_wrapper):
566
564
[
567
565
pytest .param (
568
566
id = "first notebook cell" ,
569
- marks = pytest .mark .conf_file (
567
+ marks = pytest .mark .add_conf (
570
568
content = """sphinx_gallery_conf = {'first_notebook_cell': 2,}"""
571
569
),
572
570
),
573
571
pytest .param (
574
572
id = "last notebook cell" ,
575
- marks = pytest .mark .conf_file (
573
+ marks = pytest .mark .add_conf (
576
574
content = """sphinx_gallery_conf = {'last_notebook_cell': 2,}"""
577
575
),
578
576
),
@@ -585,7 +583,7 @@ def test_notebook_cell_config(sphinx_app_wrapper):
585
583
fill_gallery_conf_defaults (app , app .config , check_keys = False )
586
584
587
585
588
- @pytest .mark .conf_file (
586
+ @pytest .mark .add_conf (
589
587
content = """
590
588
sphinx_gallery_conf = {
591
589
'backreferences_dir': False,
@@ -598,7 +596,7 @@ def test_backreferences_dir_config(sphinx_app_wrapper):
598
596
fill_gallery_conf_defaults (app , app .config , check_keys = False )
599
597
600
598
601
- @pytest .mark .conf_file (
599
+ @pytest .mark .add_conf (
602
600
content = """
603
601
sphinx_gallery_conf = {
604
602
'examples_dirs': 'src',
<
10000
tr class="diff-line-row">@@ -612,7 +610,7 @@ def test_minigallery_no_backreferences_dir(sphinx_app_wrapper):
612
610
assert "'backreferences_dir' config is None, minigallery" in build_warn
613
611
614
612
615
- @pytest .mark .conf_file (
613
+ @pytest .mark .add_conf (
616
614
content = """
617
615
import pathlib
618
616
@@ -626,7 +624,7 @@ def test_backreferences_dir_pathlib_config(sphinx_app_wrapper):
626
624
fill_gallery_conf_defaults (app , app .config , check_keys = False )
627
625
628
626
629
- @pytest .mark .conf_file (
627
+ @pytest .mark .add_conf (
630
628
content = """
631
629
sphinx_gallery_conf = {
632
630
'examples_dirs': 'src',
@@ -648,7 +646,7 @@ def test_minigallery_not_in_examples_dirs(sphinx_app_wrapper):
648
646
sphinx_app_wrapper .build_sphinx_app ()
649
647
650
648
651
- @pytest .mark .conf_file (
649
+ @pytest .mark .add_conf (
652
650
content = """
653
651
sphinx_gallery_conf = {
654
652
'examples_dirs': ['src', 'src/sub_folder/sub_sub_folder'],
@@ -688,7 +686,7 @@ def test_write_api_usage_noop(sphinx_app_wrapper):
688
686
write_api_entry_usage (sphinx_app_wrapper .create_sphinx_app (), list (), None )
689
687
690
688
691
- @pytest .mark .conf_file (
689
+ @pytest .mark .add_conf (
692
690
content = """
693
691
sphinx_gallery_conf = {
694
692
'pypandoc': ['list',],
@@ -704,7 +702,7 @@ def test_pypandoc_config_list(sphinx_app_wrapper):
704
702
fill_gallery_conf_defaults (app , app .config , check_keys = False )
705
703
706
704
707
- @pytest .mark .conf_file (
705
+ @pytest .mark .add_conf (
708
706
content = """
709
707
sphinx_gallery_conf = {
710
708
'pypandoc': {'bad key': 1},
@@ -719,7 +717,7 @@ def test_pypandoc_config_keys(sphinx_app_wrapper):
719
717
fill_gallery_conf_defaults (app , app .config , check_keys = False )
720
718
721
719
722
- @pytest .mark .conf_file (
720
+ @pytest .mark .add_conf (
723
721
content = """
724
722
extensions += ['jupyterlite_sphinx']
725
723
@@ -746,7 +744,7 @@ def test_create_jupyterlite_contents(sphinx_app_wrapper):
746
744
).exists ()
747
745
748
746
749
- @pytest .mark .conf_file (
747
+ @pytest .mark .add_conf (
750
748
content = """
751
749
extensions += ['jupyterlite_sphinx']
752
750
@@ -774,7 +772,7 @@ def test_create_jupyterlite_contents_non_default_contents(sphinx_app_wrapper):
774
772
).exists ()
775
773
776
774
777
- @pytest .mark .conf_file (
775
+ @pytest .mark .add_conf (
778
776
content = """
779
777
sphinx_gallery_conf = {
780
778
'backreferences_dir' : os.path.join('modules', 'gen'),
@@ -793,7 +791,7 @@ def test_create_jupyterlite_contents_without_jupyterlite_sphinx_loaded(
793
791
assert not Path (sphinx_app .srcdir , "jupyterlite_contents" ).exists ()
794
792
795
793
796
- @pytest .mark .conf_file (
794
+ @pytest .mark .add_conf (
797
795
content = """
798
796
extensions += ['jupyterlite_sphinx']
799
797
@@ -818,7 +816,7 @@ def test_create_jupyterlite_contents_with_jupyterlite_disabled_via_config(
818
816
assert not Path (sphinx_app .outdir , "jupyterlite_contents" ).exists ()
819
817
820
818
821
- @pytest .mark .conf_file (
819
+ @pytest .mark .add_conf (
822
820
content = """
823
821
extensions += ['jupyterlite_sphinx']
824
822
0 commit comments