Merge "Remove use of Python builtin name for variables"
This commit is contained in:
commit
f70b2ee543
|
@ -87,22 +87,22 @@ class TestTitles(testtools.TestCase):
|
||||||
|
|
||||||
|
|
||||||
def test_template(self):
|
def test_template(self):
|
||||||
files = glob.glob("guidelines/*")
|
filenames = glob.glob("guidelines/*")
|
||||||
for file in files:
|
for filename in filenames:
|
||||||
if file.endswith('~'):
|
if filename.endswith('~'):
|
||||||
continue
|
continue
|
||||||
if os.path.isdir(file):
|
if os.path.isdir(filename):
|
||||||
continue
|
continue
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
file.endswith(".rst") or file.endswith(".json"),
|
filename.endswith(".rst") or filename.endswith(".json"),
|
||||||
"guideline file must use 'rst' or 'json'"
|
"guideline file must use 'rst' or 'json'"
|
||||||
"extension: {file}".format(file=file))
|
"extension: {filename}".format(filename=filename))
|
||||||
with open(file) as f:
|
with open(filename) as f:
|
||||||
data = f.read()
|
data = f.read()
|
||||||
|
|
||||||
spec = docutils.core.publish_doctree(data)
|
spec = docutils.core.publish_doctree(data)
|
||||||
self._check_no_cr(file, data)
|
self._check_no_cr(filename, data)
|
||||||
self._check_trailing_spaces(file, data)
|
self._check_trailing_spaces(filename, data)
|
||||||
|
|
||||||
if file.endswith(".rst"):
|
if filename.endswith(".rst"):
|
||||||
self._check_lines_wrapping(file, data)
|
self._check_lines_wrapping(filename, data)
|
||||||
|
|
Loading…
Reference in New Issue