tests.test_version   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 10
dl 0
loc 25
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A TestVersion.test_version_format() 0 8 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(r'\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