File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 66 - mkdocstrings :
77 handlers :
88 vba : { }
9- python : { }
Original file line number Diff line number Diff line change 22from contextlib import contextmanager
33from pathlib import Path
44from tempfile import TemporaryDirectory
5+ from typing import Generator
56
67from locate import this_dir
78from mkdocs .commands .build import build
1213
1314
1415@contextmanager
15- def tmp_build (config_file_path : Path ):
16- with TemporaryDirectory () as tmp_dir :
17- tmp_dir = Path (tmp_dir )
16+ def tmp_build (config_file_path : Path ) -> Generator [ Path , None , None ] :
17+ with TemporaryDirectory () as tmp_dir_str :
18+ tmp_dir = Path (tmp_dir_str )
1819
1920 with config_file_path .open (mode = "rb" ) as f :
2021 config = load_config (config_file = f )
2122 config ["site_dir" ] = tmp_dir
22- build (
23- config = config ,
24- dirty = False ,
25- live_server = False ,
26- )
23+ build (config = config )
2724
2825 try :
2926 yield tmp_dir
@@ -33,9 +30,8 @@ def tmp_build(config_file_path: Path):
3330
3431class TestExamples (unittest .TestCase ):
3532 def test_example1 (self ):
36- raise unittest .SkipTest
37-
3833 with tmp_build (examples_dir .joinpath ("example1" , "mkdocs.yml" )) as tmp_dir :
34+ # TODO: Write assertions. For now, just check that it does not fail.
3935 pass
4036
4137
You can’t perform that action at this time.
0 commit comments