Passed
Push — master ( 5ad0b7...07e8f0 )
by Steffen
01:39
created

TestVersion.test_version_format()   A

Complexity

Conditions 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
dl 0
loc 8
rs 9.4285
c 1
b 0
f 1
1
#!/usr/bin/python
2
# -*- coding: utf-8 -*-
3
import re
4
import unittest
5
6
from saucenao import __version__ as saucenao_version
7
8
9
class TestVersion(unittest.TestCase):
10
    """Test the version information for Python PEP standard"""
11
12
    def test_version_format(self):
13
        """Test the version number for a PyPi valid format according to PEP 440
14
        https://www.python.org/dev/peps/pep-0440/
15
16
        :return:
17
        """
18
        # ToDo: check all requirements
19
        self.assertEqual(bool(re.match('\d+.\d+', saucenao_version.__version__)), True)
20
21
22
if __name__ == '__main__':
23
    suite = unittest.TestLoader().loadTestsFromTestCase(TestVersion)
24
    unittest.TextTestRunner(verbosity=2).run(suite)
25