Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DocumentationComment.py: Add marker[1]==marker[2] #4319

Merged
merged 1 commit into from Jun 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -221,6 +221,7 @@ def assemble(self):
assembled += ''.join('\n' if line == '\n' and not self.marker[1]
else self.indent + self.marker[1] + line
for line in lines[1:])
return (assembled +
(self.indent if lines[-1][-1] == '\n' else '') +
self.marker[2])
return (assembled if self.marker[1] == self.marker[2] else
(assembled +
(self.indent if lines[-1][-1] == '\n' else '') +
self.marker[2]))
Expand Up @@ -222,6 +222,13 @@ def test_python_assembly(self):
for doc in extract_documentation(data, 'python', 'default'):
self.assertIn(doc.assemble(), docs)

def test_doxygen_assembly(self):
data = load_testdata('doxygen.py')
docs = ''.join(data)

for doc in extract_documentation(data, 'python', 'doxygen'):
self.assertIn(doc.assemble(), docs)

def test_c_assembly(self):
data = load_testdata('default.c')
docs = ''.join(data)
Expand Down