File: test_err.py

package info (click to toggle)
m2crypto 0.46.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,952 kB
  • sloc: python: 22,921; makefile: 213; ansic: 94; sh: 17
file content (26 lines) | stat: -rw-r--r-- 609 bytes parent folder | download
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
#!/usr/bin/env python
"""Unit tests for M2Crypto.Err.

Copyright (C) 2019 Matěj Cepl
Released under the terms of MIT/X11 License,
see the file LICENCE for more.
"""
from M2Crypto import Err
from tests import unittest


class ErrTestCase(unittest.TestCase):

    def test_no_error(self):
        # Protection against gl#m2crypto/m2crypto#258
        self.assertEqual(Err.get_error_reason(0), "")


def suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.TestLoader().loadTestsFromTestCase(ErrTestCase))
    return suite


if __name__ == "__main__":
    unittest.TextTestRunner().run(suite())