blob: 20e46780ce0caf2025524231844b32d711a7e3e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# Copyright (c) 2017 Leo Hemsted
# Licensed under the BSD License, for detailed license information, see COPYING
import unittest
from docutils.core import publish_string
class SetupTestCase(unittest.TestCase):
def test_long_description(self):
"""Ensure long description can be generated"""
with open('README.rst') as f:
long_description = f.read()
overrides = {
# raises exception at warning level (2)
'halt_level': 2,
'raw_enabled': False,
}
html = publish_string(long_description, writer_name='html',
settings_overrides=overrides)
self.assertTrue(html)
|