File: test_import.py

package info (click to toggle)
quark-sphinx-theme 0.5.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 308 kB
  • sloc: python: 962; makefile: 3
file content (33 lines) | stat: -rw-r--r-- 926 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# -*- coding: utf-8 -*-
# This file is part of quark-sphinx-theme.
# Copyright (c) 2016 Felix Krull <f_krull@gmx.de>
# Released under the terms of the BSD license; see LICENSE.

import unittest


class TestModuleImport(unittest.TestCase):
    def assertImports(self, modname):
        try:
            __import__(modname)
        except ImportError as exc:
            self.fail('failed to import \'%s\': %s' % (modname, exc))

    def test_main_package(self):
        self.assertImports('quark_sphinx_theme')

    def test_mixin(self):
        self.assertImports('quark_sphinx_theme._mixin')

    def test_ext(self):
        self.assertImports('quark_sphinx_theme.ext')

    def test_ext_html_rewrite(self):
        self.assertImports('quark_sphinx_theme.ext.html_rewrite')

    def test_ext_html_compat(self):
        self.assertImports('quark_sphinx_theme.ext.html_compat')


if __name__ == '__main__':
    unittest.main()