Skip to content

Commit 8cef805

Browse files
committed
Add test for variable comments
Expand the comment test to capture the comments found on variables in a class.
1 parent 6fdbbc8 commit 8cef805

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

unittests/test_comments.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ def test(self):
5151
self.assertIn("comment", dir(tconstructor))
5252
self.assertEqual(["/** doc comment */"], tconstructor.comment.text)
5353

54+
for indx, cmt in enumerate(['//! mutable field comment',"/// bit field comment"]):
55+
tvariable = tclass.variables()[indx]
56+
self.assertIn("comment", dir(tvariable))
57+
self.assertEqual([cmt], tvariable.comment.text)
58+
5459
def create_suite():
5560
suite = unittest.TestSuite()
5661
suite.addTest(unittest.makeSuite(Test))

0 commit comments

Comments
 (0)