mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 11:51:10 +00:00
Improve __repr__ method of Milestone class (#921)
This commit add the title of milestone in string representation of Milestone class. This modification improve readbility of milestone instances. Before: ```python >>> repo.get_milestone(number=1) Milestone(number=1) ``` After: ```python >>> repo.get_milestone(number=1) Milestone(title='Milestone Example', number=1) ```
This commit is contained in:
committed by
Wan Liuyang
parent
19165519a9
commit
562908cb17
@@ -52,7 +52,7 @@ class Milestone(Framework.TestCase):
|
||||
self.assertEqual(self.milestone.creator.login, "jacquev6")
|
||||
|
||||
# test __repr__() based on this attributes
|
||||
self.assertEqual(self.milestone.__repr__(), 'Milestone(number=1)')
|
||||
self.assertEqual(self.milestone.__repr__(), 'Milestone(title="Version 0.4", number=1)')
|
||||
|
||||
def testEditWithMinimalParameters(self):
|
||||
self.milestone.edit("Title edited by PyGithub")
|
||||
|
||||
Reference in New Issue
Block a user