Skip to content

Commit bb14125

Browse files
committed
#17 Assert that examples do not log warnings.
1 parent 12681fb commit bb14125

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/test_examples.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import unittest
22
from contextlib import contextmanager
3+
from logging import WARNING
34
from pathlib import Path
45
from tempfile import TemporaryDirectory
56
from typing import Generator
@@ -29,9 +30,10 @@ def tmp_build(config_file_path: Path) -> Generator[Path, None, None]:
2930

3031
class TestExamples(unittest.TestCase):
3132
def test_example1(self) -> None:
32-
with tmp_build(examples_dir.joinpath("example1", "mkdocs.yml")) as tmp_dir:
33-
# TODO: Write assertions. For now, just check that it does not fail.
34-
pass
33+
with self.assertNoLogs(level=WARNING):
34+
with tmp_build(examples_dir.joinpath("example1", "mkdocs.yml")) as tmp_dir:
35+
# TODO: Write assertions. For now, just check that it does not fail.
36+
pass
3537

3638

3739
if __name__ == "__main__":

0 commit comments

Comments
 (0)