summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTorsten Marek <shlomme@gmail.com>2014-07-27 22:13:22 +0200
committerTorsten Marek <shlomme@gmail.com>2014-07-27 22:13:22 +0200
commit1eeab2e8757eba554f47e970d712078269e2dd31 (patch)
tree1a2e273b101f91d7e3a35b321547be11a3bf8180 /test
parent900852a253341207067c7ed7cee692ce42662884 (diff)
downloadpylint-1eeab2e8757eba554f47e970d712078269e2dd31.tar.gz
Fix test case naming in test_functional.
Diffstat (limited to 'test')
-rw-r--r--test/test_functional.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/test_functional.py b/test/test_functional.py
index 661223a..ad844b4 100644
--- a/test/test_functional.py
+++ b/test/test_functional.py
@@ -17,6 +17,10 @@ from pylint import checkers
class NoFileError(Exception):
pass
+# TODOs
+# - use a namedtuple for expected lines
+# - implement exhaustivity tests
+# - call skipTests in setUp when not using logilab.testlib any more.
# If message files should be updated instead of checked.
UPDATE = False
@@ -197,7 +201,6 @@ class LintModuleTest(testlib.TestCase):
self._test_file = test_file
def check_test(self):
- # change to setUp when not using logilab.testlib any more.
if (sys.version_info < self._test_file.options['min_pyver']
or sys.version_info >= self._test_file.options['max_pyver']):
self.skipTest(
@@ -211,8 +214,9 @@ class LintModuleTest(testlib.TestCase):
if missing:
self.skipTest('Requires %s to be present.' % (','.join(missing),))
- def shortDescription(self):
- return self._test_file.base
+ def __str__(self):
+ return "%s (%s.%s)" % (self._test_file.base, self.__class__.__module__,
+ self.__class__.__name__)
def _open_expected_file(self):
return open(self._test_file.expected_output, 'U')
@@ -221,7 +225,6 @@ class LintModuleTest(testlib.TestCase):
with open(self._test_file.source) as fobj:
expected_msgs = get_expected_messages(fobj)
-
if expected_msgs:
with self._open_expected_file() as fobj:
expected_output_lines = parse_expected_output(fobj)
@@ -311,9 +314,6 @@ def suite():
return suite
-# TODO(tmarek): Port exhaustivity test from test_func once all tests have been added.
-
-
if __name__=='__main__':
if '-u' in sys.argv:
UPDATE = True