src/pyams_viewlet/tests/test_utilsdocstrings.py
changeset 47 df022d00a9c4
parent 0 b3d96ac70a99
child 58 aa51effb1d8a
--- a/src/pyams_viewlet/tests/test_utilsdocstrings.py	Fri Jan 18 15:32:56 2019 +0100
+++ b/src/pyams_viewlet/tests/test_utilsdocstrings.py	Wed Nov 27 15:57:21 2019 +0100
@@ -1,5 +1,3 @@
-### -*- coding: utf-8 -*- ####################################################
-##############################################################################
 #
 # Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
 # All Rights Reserved.
@@ -11,21 +9,22 @@
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
 #
-##############################################################################
 
 """
 Generic Test case for pyams_viewlet doc strings
 """
+
+import doctest
+import os
+import sys
+import unittest
+
+
 __docformat__ = 'restructuredtext'
 
-import unittest
-import doctest
-import sys
-import os
+CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))
 
 
-current_dir = os.path.abspath(os.path.dirname(__file__))
-
 def doc_suite(test_dir, globs=None):
     """Returns a test suite, based on doc tests strings found in /*.py"""
     suite = []
@@ -45,7 +44,7 @@
     docs = [doc for doc in docs if not doc.startswith('__')]
 
     for test in docs:
-        fd = open(os.path.join(package_dir, test))
+        fd = open(os.path.join(package_dir, test))  # pylint: disable=invalid-name
         content = fd.read()
         fd.close()
         if '>>> ' not in content:
@@ -57,9 +56,11 @@
 
     return unittest.TestSuite(suite)
 
+
 def test_suite():
     """returns the test suite"""
-    return doc_suite(current_dir)
+    return doc_suite(CURRENT_DIR)
+
 
 if __name__ == '__main__':
     unittest.main(defaultTest='test_suite')