sphinxext-ip/tests/test_ip.py

21 lines
570 B
Python

# -*- coding: utf-8 -*-
from io import StringIO
from .util import TestApp, test_root
import unittest
class TestIPExtension(unittest.TestCase):
def setUp(self):
if not (test_root / '_static').exists():
(test_root / '_static').mkdir()
self.feed_warnfile = StringIO()
def tearDown(self):
(test_root / '_build').rmtree(True)
def test_ip4_role(self):
feed_warnfile = self.feed_warnfile
app = TestApp(buildername='html', warning=feed_warnfile, cleanenv=True)
app.build(force_all=True, filenames=[])