summaryrefslogtreecommitdiff
path: root/src/isodate/tests/__init__.py
blob: ea0f433806b3ec3961a7018a806b38bf3c7e9f90 (plain)
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
34
35
36
"""
Collect all test suites into one TestSuite instance.
"""

import unittest
import warnings
from isodate.tests import (
    test_date,
    test_time,
    test_datetime,
    test_duration,
    test_strf,
    test_pickle,
)


def test_suite():
    """
    Return a new TestSuite instance consisting of all available TestSuites.
    """
    warnings.filterwarnings("error", module=r"isodate(\..)*")

    return unittest.TestSuite(
        [
            test_date.test_suite(),
            test_time.test_suite(),
            test_datetime.test_suite(),
            test_duration.test_suite(),
            test_strf.test_suite(),
            test_pickle.test_suite(),
        ]
    )


if __name__ == "__main__":
    unittest.main(defaultTest="test_suite")