2016-05-02 20:55:09 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
|
|
jandd.sphinxext.ip unit test driver
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
This script runs the jandd.sphinxext.ip unit test suite.
|
|
|
|
|
|
|
|
:copyright: Copyright 2016 Jan Dittberner
|
|
|
|
:license: GPLv3+, see COPYING for details.
|
|
|
|
"""
|
|
|
|
|
|
|
|
import sys
|
|
|
|
import unittest
|
2021-01-02 06:20:53 +01:00
|
|
|
from os import path
|
2016-05-02 20:55:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
def run(extra_args=[]):
|
|
|
|
sys.path.insert(0, path.join(path.dirname(__file__), path.pardir))
|
2021-01-02 06:20:53 +01:00
|
|
|
sys.path.insert(
|
|
|
|
1,
|
|
|
|
path.abspath(
|
|
|
|
path.join(path.dirname(__file__), path.pardir, "jandd", "sphinxext", "ip")
|
|
|
|
),
|
2016-05-02 20:55:09 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
try:
|
|
|
|
import sphinx
|
|
|
|
except ImportError:
|
2021-01-02 06:20:53 +01:00
|
|
|
print(
|
|
|
|
"The sphinx package is needed to run the jandd.sphinxext.ip " "test suite."
|
|
|
|
)
|
2016-05-02 20:55:09 +02:00
|
|
|
|
2021-09-04 17:15:27 +02:00
|
|
|
from tests.test_ip import TestIPExtension
|
2016-05-02 20:55:09 +02:00
|
|
|
|
|
|
|
print("Running jandd.sphinxext.ip test suite ...")
|
|
|
|
|
2019-07-13 21:52:52 +02:00
|
|
|
suite = unittest.TestLoader().loadTestsFromTestCase(TestIPExtension)
|
2016-05-02 20:55:09 +02:00
|
|
|
unittest.TextTestRunner(verbosity=2).run(suite)
|
|
|
|
|
|
|
|
|
2021-01-02 06:20:53 +01:00
|
|
|
if __name__ == "__main__":
|
2016-05-02 20:55:09 +02:00
|
|
|
run()
|