[test] do not fail if pylint is not available
authorPaul Tonelli <paul.tonelli@logilab.fr>
Tue, 22 Apr 2014 15:49:20 +0200
changeset 1444 67ac48f1ad53
parent 1443 9d7e65b017f0
child 1445 c3225a2d834d
[test] do not fail if pylint is not available
test/test_functional.py
--- a/test/test_functional.py	Wed Aug 07 17:17:40 2013 +0200
+++ b/test/test_functional.py	Tue Apr 22 15:49:20 2014 +0200
@@ -39,5 +39,14 @@
         te = tc.start(self.lgce)
         self.commit()
         self.run_plan(te)
-        self.assertEqual(dict((checker.name, checker.status) for checker in te.checkers),
-                         {u'pycoverage': u'error', u'pylint': u'error', u'pyunit': u'nodata'})
+        exp = {u'pyunit': u'nodata'}
+        try:
+            import pylint
+            exp['pylint'] = u'error'
+        except:
+            pass
+
+        self.assertDictEqual(exp,
+                             dict((checker.name, checker.status) for checker in te.checkers),
+                             )
+