summaryrefslogtreecommitdiff
path: root/test/test_func.py
diff options
context:
space:
mode:
authorTorsten Marek <shlomme@gmail.com>2014-07-26 17:11:14 +0200
committerTorsten Marek <shlomme@gmail.com>2014-07-26 17:11:14 +0200
commitd1448a7e57738393a9b51d890e4cd5f163997f52 (patch)
tree3a297759ab17b823b769784dea7d2c758d1af0c6 /test/test_func.py
parent30793941b79daaeb7368c87eea35614254b65ddd (diff)
downloadpylint-d1448a7e57738393a9b51d890e4cd5f163997f52.tar.gz
Remove dependency on logilab.testlib in the test suite (also removes Python 2.5 compatibility).
Diffstat (limited to 'test/test_func.py')
-rw-r--r--test/test_func.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/test/test_func.py b/test/test_func.py
index f11eeaa..2c05d09 100644
--- a/test/test_func.py
+++ b/test/test_func.py
@@ -22,8 +22,6 @@ import re
from os import getcwd
from os.path import abspath, dirname, join
-from logilab.common import testlib
-
from pylint.testutils import (make_tests, LintTestUsingModule, LintTestUsingFile,
LintTestUpdate, cb_test_gen, linter, test_reporter)
@@ -40,9 +38,9 @@ quote = "'" if sys.version_info >= (3, 3) else ''
class LintTestNonExistentModuleTC(LintTestUsingModule):
module = 'nonexistent'
_get_expected = lambda self: 'F: 1: No module named %snonexistent%s\n' % (quote, quote)
- tags = testlib.Tags(('generated','pylint_input_%s' % module))
-class TestTests(testlib.TestCase):
+
+class TestTests(unittest.TestCase):
"""check that all testable messages have been checked"""
PORTED = set(['I0001', 'I0010', 'W0712', 'E1001', 'W1402', 'E1310', 'E0202',
'W0711', 'W0108', 'E0603', 'W0710', 'E0710', 'E0711', 'W1001',
@@ -51,7 +49,6 @@ class TestTests(testlib.TestCase):
'W0109', 'E1004', 'W0604', 'W0601', 'W0602', 'C0112', 'C0330',
'C0325', 'E0211', 'W1501'])
- @testlib.tag('coverage')
def test_exhaustivity(self):
# skip fatal messages
not_tested = set(msg.msgid for msg in linter.msgs_store.messages
@@ -104,10 +101,14 @@ FILTER_RGX = None
UPDATE = False
def suite():
- return testlib.TestSuite([unittest.makeSuite(test, suiteClass=testlib.TestSuite)
+ return unittest.TestSuite([unittest.makeSuite(test, suiteClass=unittest.TestSuite)
for test in gen_tests(FILTER_RGX)])
+def load_tests(loader, tests, pattern):
+ return suite()
+
+
if __name__=='__main__':
if '-u' in sys.argv:
UPDATE = True
@@ -116,4 +117,4 @@ if __name__=='__main__':
if len(sys.argv) > 1:
FILTER_RGX = sys.argv[1]
del sys.argv[1]
- testlib.unittest_main(defaultTest='suite')
+ unittest.main(defaultTest='suite')