summaryrefslogtreecommitdiff
path: root/tests/test_setup.py
blob: e5eb6544a72744689b1f15c9d3f5e6147f8b6e69 (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) 2013 Yu-Jie Lin
# 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)