aboutsummaryrefslogtreecommitdiffstats
path: root/libbe
diff options
context:
space:
mode:
Diffstat (limited to 'libbe')
-rw-r--r--libbe/bug.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/libbe/bug.py b/libbe/bug.py
index 0b40921..a4b569f 100644
--- a/libbe/bug.py
+++ b/libbe/bug.py
@@ -16,8 +16,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-"""
-Define the Bug class for representing bugs.
+"""Define the Bug class for representing bugs.
"""
import copy
@@ -122,7 +121,9 @@ load_status(active_status_def, inactive_status_def)
class Bug (settings_object.SavedSettingsObject):
- """
+ """A bug (or issue) is a place to store attributes and attach
+ comments. In mailing-list terms, a bug is analogous to a thread.
+
>>> b = Bug()
>>> print b.status
open
@@ -132,6 +133,7 @@ class Bug (settings_object.SavedSettingsObject):
There are two formats for time, int and string. Setting either
one will adjust the other appropriately. The string form is the
one stored in the bug's settings file on disk.
+
>>> print type(b.time)
<type 'int'>
>>> print type(b.time_string)
@@ -333,7 +335,7 @@ class Bug (settings_object.SavedSettingsObject):
return istring + sep.join(lines).rstrip('\n')
def from_xml(self, xml_string, verbose=True):
- """
+ u"""
Note: If a bug uuid is given, set .alt_id to it's value.
>>> bugA = Bug(uuid="0123", summary="Need to test Bug.from_xml()")
>>> bugA.date = "Thu, 01 Jan 1970 00:00:00 +0000"
@@ -410,6 +412,7 @@ class Bug (settings_object.SavedSettingsObject):
Add a comment too the current bug, under the parent specified
by comment.in_reply_to.
Note: If a bug uuid is given, set .alt_id to it's value.
+
>>> bugA = Bug(uuid='0123', summary='Need to test Bug.add_comment()')
>>> bugA.creator = 'Jack'
>>> commA = bugA.comment_root.new_reply(body='comment A')
@@ -506,6 +509,7 @@ class Bug (settings_object.SavedSettingsObject):
"""
Merge info from other into this bug. Overrides any attributes
in self that are listed in other.explicit_attrs.
+
>>> bugA = Bug(uuid='0123', summary='Need to test Bug.merge()')
>>> bugA.date = 'Thu, 01 Jan 1970 00:00:00 +0000'
>>> bugA.creator = 'Frank'